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

@utkbansal utkbansal commented Jul 10, 2017

Fixes #

Changes made in this Pull Request:

PR Checklist

  • Tests?
  • Docs?
  • CHANGELOG updated?
  • Issue raised/referenced?
utkbansal added 2 commits Jul 10, 2017
@utkbansal utkbansal force-pushed the utkbansal:selections branch from df73a8c to 9077fe6 Jul 10, 2017
@orbeckst orbeckst added the testing label Jul 11, 2017
Copy link
Member

@orbeckst orbeckst left a comment

see minor comments, otherwise looking good

class _SelectionWriter(TestCase):
__test__ = False
class _SelectionWriter(object):
# __test__ = False

This comment has been minimized.

@orbeckst

orbeckst Jul 11, 2017
Member

remove commented out line

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


class TestSelectionWriter_Jmol(_SelectionWriter):
__test__ = True
# __test__ = True

This comment has been minimized.

@orbeckst

orbeckst Jul 11, 2017
Member

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

@jbarnoud
Copy link
Contributor

@jbarnoud jbarnoud commented Jul 11, 2017

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):

This comment has been minimized.

@kain88-de

kain88-de Jul 11, 2017
Member

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

@utkbansal
Copy link
Member Author

@utkbansal utkbansal commented Jul 11, 2017

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

@utkbansal
Copy link
Member Author

@utkbansal utkbansal commented Jul 11, 2017

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

@jbarnoud
Copy link
Contributor

@jbarnoud jbarnoud commented Jul 12, 2017

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
3 checks passed
3 checks passed
QuantifiedCode No new issues introduced.
Details
continuous-integration/travis-ci/pr The Travis CI build passed
Details
coverage/coveralls Coverage remained the same at 89.66%
Details
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Linked issues

Successfully merging this pull request may close these issues.

None yet

4 participants