MAINT, TST: remove usage of test.support #33
Merged
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
related to Check p11 #32 (comment) cc @clevelam
the
test
package in CPython is intended for internal use by the CPython development team only, and is subject to API changes without prior deprecation, as noted here: https://docs.python.org/3.11/library/test.htmltest.support.run_unittest
is not available in Python3.11.7
, but is available in some other versions of3.11.x
and3.12.x
; clearly depending on that is not really sane, so let's just remove the usage--this allows the full test suite to pass for me locally with3.11.7
I don't think there was any good reason to keep those
test_main()
style blocks anyway--perhaps you can encourage developers to usepytest path/to/test_module.py
, which will do the same thing (most/all OSS packages would suggest that at this point I think); if you have folks who were running the tests withpython path/to/test_module.py
they'd need to swap to usingpytest
for the incantation, but maybe that's something you can live with?