Skip to content

Add _contains_html function#9

Merged
mehuljhaver4 merged 1 commit into
developfrom
feature/add_contains_html
Nov 6, 2023
Merged

Add _contains_html function#9
mehuljhaver4 merged 1 commit into
developfrom
feature/add_contains_html

Conversation

@michael-bentz
Copy link
Copy Markdown
Contributor

What does this change do?

Adds _contains_html function with unit tests.

Why was this change made?

To close #3.

Verification

  1. Verify the logic of the test_contains_html unit test
  2. Verify that all automated workflows pass
  • Verify the thing does this: ...
  • Verify the thing does not do that: ...

Affirmations

All of these should have a check by them. Any exception requires an explanation.

  • I have added docstrings with details on keyword arguments to new functions following the convention detailed in this gist
  • I have added type hinting to new function parameters.
  • I have added tests to new functions, following the rules of F.I.R.S.T..
  • I matched the style of the existing code.
  • I added and updated any relevant documentation (inline, README, CHANGELOG, and such).
  • I used Python's type hinting.
  • I ran the automated tests and ensured they ALL passed.
  • I ran the linter and ensured my changes have not introduced ANY warnings or errors.
  • I have made an effort to minimize code changes and have not included any cruft (preference files, *.pyc files, old comments, print-debugging, unused variables).
  • I have made an effort maintain a clear commit history (haven't merged other branches or rebased improperly).
  • I have written the code myself or have given credit where credit is due.

@mehuljhaver4 mehuljhaver4 self-requested a review November 6, 2023 14:29
Copy link
Copy Markdown
Contributor

@mehuljhaver4 mehuljhaver4 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

  • Verified the logic of the test_contains_html unit test
  • Verified that all automated workflows passed

html_markup = "<html><p></p></html>"
non_html_text = "This is a sentence with special characters, < ? ! . '"

self.assertEquals(True, utils._contains_html(html_markup))
Copy link
Copy Markdown
Contributor

@mehuljhaver4 mehuljhaver4 Nov 6, 2023

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

line 16 and similar lines show the following problem:

Cannot access member "assertEquals" for type "TestUtils" Member "assertEquals" is unknownPylanc reportGeneralTypeIssues

But the tests run successfully

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'm not sure how you're getting this. I don't see it locally and the lint workflow is passing.

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Must be some issue at my end. I'll merge it.

@mehuljhaver4 mehuljhaver4 merged commit 7a81071 into develop Nov 6, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants