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

Conversation

Projects
None yet
5 participants
@utkbansal
Member

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 from [Review Needed]Pytest Style core/test_requires.py to Pytest Style core/test_requires.py Aug 15, 2017

@orbeckst

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

This comment has been minimized.

Member

kain88-de commented Aug 17, 2017

@utkbansal please address the issues

has been addressed

@richardjgowers richardjgowers merged commit 38e9e92 into MDAnalysis:develop Aug 21, 2017

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