Skip to content
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

Pytest Style: test_selections.py #1471

Merged
merged 3 commits into from Jul 12, 2017
Merged

Conversation

utkbansal
Copy link
Member

Fixes #

Changes made in this Pull Request:

PR Checklist

  • Tests?
  • Docs?
  • CHANGELOG updated?
  • Issue raised/referenced?

Copy link
Member

@orbeckst orbeckst left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

see minor comments, otherwise looking good

class _SelectionWriter(TestCase):
__test__ = False
class _SelectionWriter(object):
# __test__ = False
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

remove commented out line

@@ -189,7 +188,7 @@ def spt2array(line):


class TestSelectionWriter_Jmol(_SelectionWriter):
__test__ = True
# __test__ = True
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

remove comment (I assume that the test still gets executed?)

@jbarnoud
Copy link
Contributor

Wouldn't this test suite benefit from parametrizing the base class instead of subclassing it?

@@ -100,7 +99,6 @@ def lines2one(lines):


class TestSelectionWriter_Gromacs(_SelectionWriter):
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

why are you using the composition here? We wanted to Avoid mixing classes.

@utkbansal
Copy link
Member Author

@jbarnoud @kain88-de _assert_selectionstring method varies across classes. What do I do about that?

@utkbansal
Copy link
Member Author

Isn't this a case similar to the coordinates tests?

@jbarnoud
Copy link
Contributor

Hum... They indeed differ more than I initially thought, especially the gromacs one. @kain88-de ?

@kain88-de kain88-de merged commit 4c6bc8b into MDAnalysis:develop Jul 12, 2017
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

4 participants