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 core/test_requires.py #1626

Merged
merged 2 commits into from Aug 21, 2017
Merged

Conversation

@utkbansal
Copy link
Member

@utkbansal utkbansal commented Aug 15, 2017

Fixes #

Changes made in this Pull Request:

PR Checklist

  • Tests?
  • Docs?
  • CHANGELOG updated?
  • Issue raised/referenced?
else:
raise AssertionError("Should raise NoDataError")
raise pytest.fail(msg="Should raise NoDataError")

This comment has been minimized.

@kain88-de

kain88-de Aug 15, 2017
Member

is pytest.fail an exception?

This comment has been minimized.

@orbeckst

orbeckst Aug 16, 2017
Member

No, pytest.fail is a function and should just be called:

pytest.fail(msg="Should raise NoDataError")

(See also real world examples).

@utkbansal utkbansal changed the title [Review Needed]Pytest Style core/test_requires.py Pytest Style core/test_requires.py Aug 15, 2017
Copy link
Member

@orbeckst orbeckst left a comment

See comment on pytest.fail().

else:
raise AssertionError("Should raise NoDataError")
raise pytest.fail(msg="Should raise NoDataError")

This comment has been minimized.

@orbeckst

orbeckst Aug 16, 2017
Member

Do not raise, just use imperatively:

else:
   pytest.fail(msg="Should raise NoDataError")
@kain88-de
Copy link
Member

@kain88-de kain88-de commented Aug 17, 2017

@utkbansal please address the issues

@richardjgowers richardjgowers dismissed orbeckst’s stale review Aug 21, 2017

has been addressed

@richardjgowers richardjgowers merged commit 38e9e92 into MDAnalysis:develop Aug 21, 2017
2 checks passed
2 checks passed
continuous-integration/travis-ci/pr The Travis CI build passed
Details
coverage/coveralls Coverage increased (+0.01%) to 90.603%
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

5 participants