-
Notifications
You must be signed in to change notification settings - Fork 126
993 progress: convert 3 more files to pytest #1520
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
* replace unittest asserts with pytest asserts * remove maxDiff
sed -i.bak -E 's/self.assertEqual\((.*), (.*)\)/assert \1 == \2/' tests/test_collection.py note needed a bit of editing as multiple commas in one line could confuse sed
Codecov ReportAll modified and coverable lines are covered by tests ✅
Additional details and impacted files@@ Coverage Diff @@
## main #1520 +/- ##
=======================================
Coverage 91.47% 91.47%
=======================================
Files 54 54
Lines 7542 7542
Branches 915 915
=======================================
Hits 6899 6899
Misses 457 457
Partials 186 186 ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks for doing the hard yards 🙇🏼
|
Sure thing! Likewise I'm glad to be getting practice and catching up on newer stuff like type annotations. |
* 993 convert test_item_assets.py to pytest * 993 progress on test_item_collection.py: * replace unittest asserts with pytest asserts * remove maxDiff * 993 remove class (nonfunctional atm) * 993 remove self from methods (still not functional) * 993 install fixtures & finish first test conversion * 993 complete conversion to pytest for test_item_collection.py * 993 pre-commit fixups * 993 start on test_collection.py * 993 revise assertion * 993 replace assertEqual with assert; cmd line: sed -i.bak -E 's/self.assertEqual\((.*), (.*)\)/assert \1 == \2/' tests/test_collection.py note needed a bit of editing as multiple commas in one line could confuse sed * 993 convert rest of asserts * 993 convert CollectionTest to top-level functions * 993 remove self to prep for declassification * 993 convert ExtentTest method tests to functions * 993 convert Collection subclass tests to pytest * 993 complete test_collection.py conversion to pytest * 993 fastidious revisions by ruff
Related Issue(s): #993
Description: Continued in the pattern for the previous 993 PR: Converted tests from unittest to pytest
PR Checklist:
pre-commit run --all-files)pytest)Documentation has been updated to reflect changes, if applicableor improvesoverall codebase code coverage.Changes are added to the CHANGELOG. See the docs for information about adding to the changelog.