Skip to content
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

catch expected NoTypeWarnings in tests #172

Merged
merged 2 commits into from
Jun 14, 2023

Conversation

braingram
Copy link
Collaborator

@braingram braingram commented Jun 13, 2023

I noticed a few expected NoTypeWarning messages in the test logs. This PR uses pytest.warns to catch (and check for) these warnings and modifies the import of NoTypeWarning in test_schema_against_crds.py to make sure that the issued NoTypeWarning class in the warning filter matches the one issued by the code (this can differ if the tests are run from the repository by the code being tested is installed).

Checklist

  • added entry in CHANGES.rst (either in Bug Fixes or Changes to API)
  • updated relevant tests
  • updated relevant documentation
  • updated relevant milestone(s)
  • added relevant label(s)

@braingram braingram added the no-changelog-entry-needed Trivial change that doesn't need an entry in the change log label Jun 13, 2023
@braingram braingram marked this pull request as ready for review June 13, 2023 20:34
@braingram braingram requested a review from a team as a code owner June 13, 2023 20:34
@codecov
Copy link

codecov bot commented Jun 13, 2023

Codecov Report

Patch and project coverage have no change.

Comparison is base (43877cb) 63.69% compared to head (1cfff19) 63.69%.

Additional details and impacted files
@@           Coverage Diff           @@
##           master     #172   +/-   ##
=======================================
  Coverage   63.69%   63.69%           
=======================================
  Files         100      100           
  Lines        5517     5517           
=======================================
  Hits         3514     3514           
  Misses       2003     2003           

☔ View full report in Codecov by Sentry.
📢 Do you have feedback about the report comment? Let us know in this issue.

@braingram
Copy link
Collaborator Author

jwst downstream test failures are expected and unrelated. They are related to
spacetelescope/jwst#7590
and
spacetelescope/jwst#7605

Copy link
Collaborator

@hbushouse hbushouse left a comment

Choose a reason for hiding this comment

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

Looks OK to me.

@braingram braingram merged commit 04535a5 into spacetelescope:master Jun 14, 2023
@braingram braingram deleted the tst/catch_notypewarning branch June 14, 2023 15:20
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
no-changelog-entry-needed Trivial change that doesn't need an entry in the change log testing
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants