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

update test warning filter for pytest 8 #1729

Merged
merged 3 commits into from
Jan 22, 2024

Conversation

braingram
Copy link
Contributor

@braingram braingram commented Jan 8, 2024

pytest 8 includes a change to how "pytest.warns" behaves (it now re-emits non-matched warnings). Running the asdf test suite against pytest 8 (rc1) there is one failing test test_asdf_asdf_SerializationContext_import_deprecation due to this change.

This PR updates the warning filters in test_asdf_asdf_SerializationContext_import_deprecation to work with pytest 8.

This PR also adds pytest pre release testing to devdeps. Once this PR is merged #1731 can be updated to add pytest dev (perhaps in a separate tox environment) since asdf provides a pytest plugin and likely would benefit from testing against pytest dev.

Description

Checklist:

  • pre-commit checks ran successfully
  • tests ran successfully
  • for a public change, a changelog entry was added
  • for a public change, documentation was updated
  • for any new features, unit tests were added

@braingram braingram marked this pull request as ready for review January 8, 2024 19:23
@braingram braingram requested a review from a team as a code owner January 8, 2024 19:23
@@ -5,6 +5,8 @@ git+https://github.com/asdf-format/asdf-unit-schemas.git
git+https://github.com/asdf-format/asdf-wcs-schemas
git+https://github.com/yaml/pyyaml.git

pytest>=0.0.dev0
Copy link
Member

Choose a reason for hiding this comment

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

should we run this in a different dev test?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Thanks for giving this a review.

That sounds like a great idea! It does seem bad to have all our devdeps fail just because pytest makes some change. I am planning to update #1731 and bring it out of draft after this PR is merged which would install pytest from dev (further increasing the risk of a change breaking all the tests).

Do you have a suggestion for how to break this out? Maybe update tox with a -pytestdev option and add it to the CI? Thanks in advance for your help :)

Copy link
Member

Choose a reason for hiding this comment

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

yeah I think a -pytestdev tox factor is a good idea, because then we could also theoretically mix and match it with -devdeps or -stdevdeps

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Good point! I'll update this PR.

@braingram
Copy link
Contributor Author

Thanks @zacharyburnett I switched to the -pytestdev tox factor and added that to the CI. The log:
https://github.com/asdf-format/asdf/actions/runs/7616350863/job/20743185463?pr=1729#step:10:71
confirms it's running with pytest-8.0.0rc2.

@braingram braingram merged commit 198b9ed into asdf-format:main Jan 22, 2024
34 checks passed
@braingram braingram deleted the pytest_8_warnings branch January 22, 2024 20:21
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants