Skip to content

Conversation

@teks
Copy link
Contributor

@teks teks commented Feb 6, 2025

Related Issue(s): #993

Description: Continued in the pattern for the previous 993 PR: Converted tests from unittest to pytest

PR Checklist:

  • Pre-commit hooks pass (run pre-commit run --all-files)
  • Tests pass (run pytest)
  • Documentation has been updated to reflect changes, if applicable
  • This PR maintains or improves overall codebase code coverage.
  • Changes are added to the CHANGELOG. See the docs for information about adding to the changelog.

@codecov
Copy link

codecov bot commented Feb 6, 2025

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 91.47%. Comparing base (e6ea793) to head (f2fbfc5).
Report is 19 commits behind head on main.

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.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

Copy link
Member

@gadomski gadomski left a 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 🙇🏼

@gadomski gadomski added this pull request to the merge queue Feb 6, 2025
Merged via the queue into stac-utils:main with commit 542b9fb Feb 6, 2025
19 checks passed
@teks
Copy link
Contributor Author

teks commented Feb 6, 2025

Sure thing! Likewise I'm glad to be getting practice and catching up on newer stuff like type annotations.

kmodali pushed a commit to kmodali/pystac that referenced this pull request Oct 16, 2025
* 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
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