Skip to content

TST: separate least squares fit test classes for 2D and 3D shapes - #810

Open
MargotHTeunisse wants to merge 2 commits into
soft-matter:masterfrom
MargotHTeunisse:separate-least-squares-test-by-ndim
Open

MargotHTeunisse wants to merge 2 commits into
soft-matter:masterfrom
MargotHTeunisse:separate-least-squares-test-by-ndim

Conversation

@MargotHTeunisse

Copy link
Copy Markdown

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 RefineTsts in the generic AbstractShapeTestFit class, except the test for tetramers, which I've put in Abstract3DShapeTestFit.

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.

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
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant