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

Test Outcomes as BaseException - fix #580 #2490

Merged
merged 2 commits into from
Jul 30, 2017

Conversation

RonnyPfannschmidt
Copy link
Member

@RonnyPfannschmidt RonnyPfannschmidt commented Jun 11, 2017

Thanks for submitting a PR, your contribution is really appreciated!

Here's a quick checklist that should be present in PRs:

  • Add a new news fragment into the changelog folder
    • name it $issue_id.$type for example (588.bug)
    • if you don't have an issue_id change it to the pr id after creating the pr
    • ensure type is one of removal, feature, bugfix, vendor, doc or trivial
    • Make sure to use full sentences with correct case and punctuation, for example: "Fix issue with non-ascii contents in doctest text files."
  • Target: for bugfix, vendor, doc or trivial fixes, target master; for removals or features target features;
  • Make sure to include reasonable tests for your change if necessary

@RonnyPfannschmidt RonnyPfannschmidt changed the base branch from master to features June 11, 2017 13:51
CHANGELOG.rst Outdated
@@ -1361,6 +1361,11 @@ time or change existing behaviors in order to make them less surprising/more use
Thanks Mathieu Agopian for the report and Ronny Pfannschmidt for the PR.

- fix issue 1029: transform errors when writing cache values into pytest-warnings
2.8.1
-----------------------------
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 adding an entry for 2.8.1?

Copy link
Member Author

Choose a reason for hiding this comment

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

i re-based the code - this one will go away

@@ -0,0 +1 @@
make pytest.fail/skip/xfail instances of BaseException
Copy link
Member

Choose a reason for hiding this comment

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

I think it would be nice to explain the change with some context to end-users, something like:

Exceptions raised by pytest.fail, pytest.skip and pytest.xfail now subclass BaseException, making them harder to be caught unintentionally by normal code.

Copy link
Member

Choose a reason for hiding this comment

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

Also if we will release a new major version, should we add this in a "backward incompatibility" section perhaps?

@RonnyPfannschmidt
Copy link
Member Author

@nicoddemus i did realize that we may need to do a major release for this one due to changing the base-class of exposed types

@RonnyPfannschmidt RonnyPfannschmidt added this to the 4.0 milestone Jun 11, 2017
@RonnyPfannschmidt RonnyPfannschmidt changed the title [wip] Fix 580 Test Outcomes as BaseException Jun 11, 2017
@coveralls
Copy link

Coverage Status

Coverage decreased (-0.03%) to 92.104% when pulling c81380d on RonnyPfannschmidt:fix-580 into 9bd8907 on pytest-dev:features.

@pytest-dev pytest-dev deleted a comment from coveralls Jul 28, 2017
@pytest-dev pytest-dev deleted a comment from coveralls Jul 28, 2017
@pytest-dev pytest-dev deleted a comment from coveralls Jul 28, 2017
@RonnyPfannschmidt RonnyPfannschmidt changed the title Test Outcomes as BaseException Test Outcomes as BaseException - fix #580 Jul 28, 2017
@coveralls
Copy link

Coverage Status

Coverage decreased (-0.03%) to 91.857% when pulling 06a4933 on RonnyPfannschmidt:fix-580 into 1712196 on pytest-dev:features.

@coveralls
Copy link

Coverage Status

Coverage decreased (-0.03%) to 91.857% when pulling be401bc on RonnyPfannschmidt:fix-580 into 1712196 on pytest-dev:features.

@nicoddemus nicoddemus merged commit e1aed8c into pytest-dev:features Jul 30, 2017
miketheman added a commit to miketheman/pytest-socket that referenced this pull request Sep 6, 2017
As of pytest 3.2.0, the internal outcome class no longer inherits from
Exception, rather from BaseException.

This was reported in pytest-dev/pytest#580 and changed in pytest-dev/pytest#2490

Signed-off-by: Mike Fiedler <[email protected]>
miketheman added a commit to miketheman/pytest-socket that referenced this pull request Sep 6, 2017
As of pytest 3.2.0, the internal outcome class no longer inherits from
Exception, rather from BaseException.

This was reported in pytest-dev/pytest#580 and changed in pytest-dev/pytest#2490

Signed-off-by: Mike Fiedler <[email protected]>
@RonnyPfannschmidt RonnyPfannschmidt deleted the fix-580 branch November 13, 2017 10:06
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.

3 participants