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

fix #4386 - restructure construction and partial state of ExceptionInfo #4438

Conversation

RonnyPfannschmidt
Copy link
Member

@RonnyPfannschmidt RonnyPfannschmidt commented Nov 22, 2018

fixes #4386

@RonnyPfannschmidt RonnyPfannschmidt changed the title WIP: fix #4386 - restructure construction and partial state of ExceptionInfo fix #4386 - restructure construction and partial state of ExceptionInfo Nov 22, 2018
@codecov
Copy link

codecov bot commented Nov 22, 2018

Codecov Report

Merging #4438 into features will increase coverage by <.01%.
The diff coverage is 95.83%.

Impacted file tree graph

@@             Coverage Diff              @@
##           features    #4438      +/-   ##
============================================
+ Coverage     95.87%   95.87%   +<.01%     
============================================
  Files           111      111              
  Lines         25024    25044      +20     
  Branches       2444     2447       +3     
============================================
+ Hits          23992    24012      +20     
  Misses          730      730              
  Partials        302      302
Flag Coverage Δ
#docs 30.2% <61.81%> (+0.12%) ⬆️
#doctesting 30.2% <61.81%> (+0.12%) ⬆️
#linting 30.2% <61.81%> (+0.12%) ⬆️
#linux 95.71% <95.83%> (ø) ⬆️
#nobyte 92.63% <95.83%> (ø) ⬆️
#numpy 93.43% <95.83%> (ø) ⬆️
#pexpect 41.95% <74.54%> (+0.04%) ⬆️
#py27 94.01% <95.83%> (ø) ⬆️
#py34 92.15% <95.83%> (+0.07%) ⬆️
#py35 92.17% <95.83%> (+0.07%) ⬆️
#py36 92.19% <95.83%> (+0.07%) ⬆️
#py37 94.08% <95.83%> (+0.02%) ⬆️
#trial 93.43% <95.83%> (ø) ⬆️
#windows 94.09% <95.83%> (ø) ⬆️
#xdist 93.94% <95.83%> (ø) ⬆️
Impacted Files Coverage Δ
src/_pytest/assertion/util.py 98.11% <ø> (ø) ⬆️
src/_pytest/unittest.py 94.41% <100%> (+0.06%) ⬆️
src/_pytest/runner.py 96.91% <100%> (ø) ⬆️
src/_pytest/main.py 96.96% <100%> (ø) ⬆️
src/_pytest/python_api.py 97.42% <100%> (ø) ⬆️
src/_pytest/python.py 95.27% <100%> (ø) ⬆️
testing/code/test_code.py 94.2% <100%> (ø) ⬆️
testing/test_resultlog.py 100% <100%> (ø) ⬆️
testing/code/test_excinfo.py 96.78% <100%> (+0.01%) ⬆️
testing/test_runner.py 96.91% <75%> (-0.03%) ⬇️
... and 1 more

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update d894bf4...2eaf3db. Read the comment docs.

@RonnyPfannschmidt RonnyPfannschmidt changed the title fix #4386 - restructure construction and partial state of ExceptionInfo WIP:fix #4386 - restructure construction and partial state of ExceptionInfo Nov 22, 2018
@RonnyPfannschmidt RonnyPfannschmidt changed the title WIP:fix #4386 - restructure construction and partial state of ExceptionInfo fix #4386 - restructure construction and partial state of ExceptionInfo Nov 22, 2018
src/_pytest/unittest.py Show resolved Hide resolved
src/_pytest/_code/code.py Show resolved Hide resolved
src/_pytest/_code/code.py Show resolved Hide resolved
src/_pytest/_code/code.py Show resolved Hide resolved
src/_pytest/_code/code.py Show resolved Hide resolved
src/_pytest/_code/code.py Outdated Show resolved Hide resolved
@nicoddemus
Copy link
Member

Nice work, I like the approach! Just some minor corrections/docs and suggestions. 👍

Copy link
Member

@nicoddemus nicoddemus left a comment

Choose a reason for hiding this comment

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

Great work!

@nicoddemus nicoddemus merged commit 63f90a2 into pytest-dev:features Nov 23, 2018
@RonnyPfannschmidt RonnyPfannschmidt deleted the fix-4386-raises-partial-object branch November 30, 2018 13:30
@blueyed
Copy link
Contributor

blueyed commented Dec 11, 2018

This breaks xdist:

        except:  # noqa
            from _pytest._code import ExceptionInfo
    
>           excinfo = ExceptionInfo()
E           TypeError: __init__() missing 1 required positional argument: 'excinfo'

…/Vcs/pytest-xdist/xdist/workermanage.py:350: TypeError

@RonnyPfannschmidt
Copy link
Member Author

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.

None yet

3 participants