Repository navigation
TST: separate least squares fit test classes for 2D and 3D shapes - #810
Open
MargotHTeunisse wants to merge 2 commits into
Open
MargotHTeunisse wants to merge 2 commits into
MargotHTeunisse wants to merge 2 commits into
Conversation
This is the first step in changing the base class to separate between 2D and 3D. Rename base class from 'RefineTsts' to 'AbstractShapeTestFit' to better reflect usage.
Remove meaningless skipped test which tries to test tetramer in 2D
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.
What?
I've used abstract base classes (ABC) to distinguish tests for 2D and 3D shapes in test_leastsq.py.
I've put all tests and helper functions that used to be in
RefineTstsin the genericAbstractShapeTestFitclass, except the test for tetramers, which I've put inAbstract3DShapeTestFit.Why?
The earlier test structure created a needless 2D test for tetramers, which is confusing. With separate 2D and 3D test classes, you no longer need to skip 2D-only tests for 3D objects and vice versa.
Further notes
I noticed some helper functions have IF statements checking for the 2D and 3D case. It might be better to have separate tests for 2D and 3D here as well, but since the tests are already quite complicated I've taken a conservative approach.