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

Show node that originated a warning in the warnings summary #4229

Merged

Conversation

nicoddemus
Copy link
Member

Weird that nobody has reported this regression until now (and embarrassing that I did not notice this myself earlier!)

Here's how it looks on master:

========================= warnings summary ==========================
c:\pytest\.tmp\test-warning-loc.py:5: UserWarning: This is a test warning
  warnings.warn("This is a test warning")

And with this PR:

========================= warnings summary ==========================
test-warning-loc.py::test_foo
  c:\pytest\.tmp\test-warning-loc.py:5: UserWarning: This is a test warning
    warnings.warn("This is a test warning")

Fix #4221

@blueyed
Copy link
Contributor

blueyed commented Oct 24, 2018

Flake complains:

src/_pytest/debugging.py:4:1: F401 'os' imported but unused

Not related to this PR though apparently.

@nicoddemus
Copy link
Member Author

Oh bummer. Fixing in sec...

@asottile
Copy link
Member

heh, an implicit merge conflict with the debugger branch 🙃

@nicoddemus
Copy link
Member Author

Oh bummer. Fixing in sec...

Or I will rebase on #4231. 😁

@nicoddemus nicoddemus force-pushed the fix-warning-location branch from a560145 to 2ad43ee Compare October 24, 2018 21:50
@nicoddemus
Copy link
Member Author

Done, should be fine now. 👍

@codecov
Copy link

codecov bot commented Oct 24, 2018

Codecov Report

❗ No coverage uploaded for pull request base (master@15278aa). Click here to learn what that means.
The diff coverage is 100%.

Impacted file tree graph

@@           Coverage Diff            @@
##             master   #4229   +/-   ##
========================================
  Coverage          ?   93.6%           
========================================
  Files             ?     109           
  Lines             ?   24537           
  Branches          ?    2412           
========================================
  Hits              ?   22969           
  Misses            ?    1245           
  Partials          ?     323
Flag Coverage Δ
#linux 93.47% <100%> (?)
#py27 91.53% <100%> (?)
#py34 92.12% <100%> (?)
#py36 92.11% <100%> (?)
#windows 91.04% <100%> (?)
Impacted Files Coverage Δ
testing/test_warnings.py 98.55% <ø> (ø)
src/_pytest/terminal.py 91.08% <100%> (ø)

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 15278aa...2ad43ee. Read the comment docs.

@RonnyPfannschmidt
Copy link
Member

seems to be a travis timeout

@RonnyPfannschmidt
Copy link
Member

it seems the appveyor failure is neglect-able here

@RonnyPfannschmidt RonnyPfannschmidt merged commit f6dfca7 into pytest-dev:master Oct 25, 2018
@nicoddemus nicoddemus deleted the fix-warning-location branch October 25, 2018 10:53
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.

4 participants