-
-
Notifications
You must be signed in to change notification settings - Fork 31.7k
Use test_both() consistently throughout test_importlib #65702
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
Comments
test_importlib.util provides the test_both() function that facilitates testing both the frozen and source versions of importlib. The function helps to keep the tests more maintainable. However, the following test modules are not using test_both(): Lib/test/test_importlib/test_abc.py Furthermore, the remaining test modules use test_both() inconsistently. Here is a patch that makes consistent use of test_both() and formats usage in a way that helps with readability. |
I see you noticed my shift in strategy after I realized part way through a cleaner way of doing things. =) LGTM I don't love the formatting of the test_both() lines, but I think that one is just an aesthetic thing that will never make people happy -- weird line wrapping or really long lines -- so just leave it as-is in your patch. |
Yeah, I went with the formatting that I did because I found it a |
FWIW, this change was motivated by the importlib backport (I found some time to work on it). The import_importlib()/test_both() approach definitely makes backporting the tests easier (thanks for that). BTW, thanks for also consolidating the various test_importlib util modules. That also helped. |
New changeset 34d65746d5ca by Eric Snow in branch 'default': |
Note: these values reflect the state of the issue at the time it was migrated and might not reflect the current state.
Show more details
GitHub fields:
bugs.python.org fields:
The text was updated successfully, but these errors were encountered: