Repository navigation
Simple refactoring to reduce astropy import time. #7647
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
Changes from 1 commit
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
- Loading branch information
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -73,14 +73,3 @@ def _minversion_test(): | |
| assert minversion(test_module, version) | ||
| for version in bad_versions: | ||
| assert not minversion(test_module, version) | ||
|
|
||
|
|
||
| def test_minversion(): | ||
|
Member
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Does
Member
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. I agree, I think
Contributor
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Wow, proof yet again how useful review is... How could I have missed that! |
||
| import sys | ||
| if 'pkg_resources' in sys.modules: | ||
| pkg_resources_saved = sys.modules['pkg_resources'] | ||
| # Force ImportError for pkg_resources in minversion() | ||
| sys.modules['pkg_resource'] = None | ||
| _minversion_test() | ||
| sys.modules['pkg_resource'] = pkg_resources_saved | ||
| _minversion_test() | ||
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I don't know if this is true anymore:
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
(this was added in #5944 so we should check why)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Good point. All tests pass on python 3.7 at least without it. I'll push a new commit that removes the doctoring - we'll see if the tests #5944 added pass on all versions.