move BoxLeastSquaresResults.assert_allclose to separate testing function#7938
Merged
crawfordsm merged 1 commit intoastropy:masterfrom Oct 21, 2018
Merged
move BoxLeastSquaresResults.assert_allclose to separate testing function#7938crawfordsm merged 1 commit intoastropy:masterfrom
crawfordsm merged 1 commit intoastropy:masterfrom
Conversation
This prevents an implict pytest requirement at import-time
|
Hi there @eteq 👋 - thanks for the pull request! I'm just a friendly 🤖 that checks for issues related to the changelog and making sure that this pull request is milestoned and labeled correctly. This is mainly intended for the maintainers, so if you are not a maintainer you can ignore this, and a maintainer will let you know if any action is required on your part 😃. Everything looks good from my point of view! 👍 If there are any issues with this message, please report them here. |
This was referenced Oct 21, 2018
astrofrog
approved these changes
Oct 21, 2018
pllim
reviewed
Oct 21, 2018
| def __dir__(self): | ||
| return list(self.keys()) | ||
|
|
||
| def assert_allclose(self, other, **kwargs): |
Member
There was a problem hiding this comment.
I still think something like allclose that returns boolean might be nice for users, but I guess it can be implemented (again) if there is demand. Thanks!
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
This is an alternative to #7932 prompted by #7932 (comment) - it moves the
BoxLeastSquaresResults.assert_quantity_allclosemethod (used for testing) into the test suite instead of in the code itself. This prevents an implicitpytestdependency that came from importing some of the testing code (which isn't supposed to be done by the user unless they have pytest)Proximate need is to address the problem pointed out in astropy/astropy-benchmarks#68, but in general we shouldn't have a pytest import-time dependency