Skip to content

don`t parse compat properties as fixtures#4164

Merged
nicoddemus merged 2 commits intopytest-dev:masterfrom
RonnyPfannschmidt:nowarn-session-attributes
Oct 31, 2018
Merged

don`t parse compat properties as fixtures#4164
nicoddemus merged 2 commits intopytest-dev:masterfrom
RonnyPfannschmidt:nowarn-session-attributes

Conversation

@RonnyPfannschmidt
Copy link
Member

@RonnyPfannschmidt RonnyPfannschmidt commented Oct 16, 2018

Fix #2701

its tricky to trigger those warnings under normal circumstances as they happen before pytest hooks into the warnings system

python -W always -m pytest testing/test_tmpdir.py --collectonly could be used to trigger them for example on the cli

@codecov
Copy link

codecov bot commented Oct 16, 2018

Codecov Report

Merging #4164 into master will decrease coverage by 0.01%.
The diff coverage is 50%.

Impacted file tree graph

@@            Coverage Diff             @@
##           master    #4164      +/-   ##
==========================================
- Coverage   95.87%   95.85%   -0.02%     
==========================================
  Files         109      109              
  Lines       24626    24610      -16     
  Branches     2395     2395              
==========================================
- Hits        23609    23591      -18     
- Misses        721      722       +1     
- Partials      296      297       +1
Flag Coverage Δ
#docs 29.04% <50%> (+0.02%) ⬆️
#doctesting 29.04% <50%> (+0.02%) ⬆️
#linting 29.04% <50%> (+0.02%) ⬆️
#linux 95.64% <50%> (-0.02%) ⬇️
#nobyte 91.37% <50%> (-0.66%) ⬇️
#numpy 41.65% <50%> (-51.38%) ⬇️
#pexpect 41.65% <50%> (+0.03%) ⬆️
#py27 94.04% <50%> (ø) ⬆️
#py34 92.21% <50%> (-0.11%) ⬇️
#py35 92.35% <50%> (+0.01%) ⬆️
#py36 93.98% <50%> (-0.02%) ⬇️
#py37 92.34% <50%> (ø) ⬆️
#trial 41.65% <50%> (-51.38%) ⬇️
#windows 93.38% <50%> (-0.76%) ⬇️
#xdist 93.72% <50%> (-0.18%) ⬇️
Impacted Files Coverage Δ
src/_pytest/fixtures.py 97.12% <50%> (-0.25%) ⬇️
src/_pytest/pathlib.py 89.26% <0%> (-0.36%) ⬇️
src/_pytest/_code/source.py 90.65% <0%> (-0.09%) ⬇️
testing/test_pathlib.py
testing/test_paths.py 100% <0%> (ø)

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 ff04a1f...b5d62cd. Read the comment docs.

@coveralls
Copy link

coveralls commented Oct 17, 2018

Coverage Status

Coverage increased (+0.02%) to 94.037% when pulling 877a4ab on RonnyPfannschmidt:nowarn-session-attributes into 17655b5 on pytest-dev:master.

@nicoddemus
Copy link
Member

Hi @RonnyPfannschmidt, this seems to be working fine, why is it a RFC? Seems like it gets rid of the warnings about compat-properties during fixture collection quite nicely. 👍

@RonnyPfannschmidt
Copy link
Member Author

@nicoddemus mainly because i skipped on tests and the docs

@nicoddemus
Copy link
Member

Oh OK, I was under an erroneous definition of what RFC meant. 😁

@RonnyPfannschmidt
Copy link
Member Author

no, i was ^^

@RonnyPfannschmidt RonnyPfannschmidt changed the title [RFC][NOMERGE] don`t parse compat properties as fixtures [WIP] don`t parse compat properties as fixtures Oct 18, 2018
@RonnyPfannschmidt RonnyPfannschmidt force-pushed the nowarn-session-attributes branch 2 times, most recently from cfaa19e to b55f5eb Compare October 31, 2018 13:58
this avoid triggering the warnings when parsing the session node as session plugin
@RonnyPfannschmidt RonnyPfannschmidt force-pushed the nowarn-session-attributes branch from b55f5eb to da04ff5 Compare October 31, 2018 14:01
@RonnyPfannschmidt RonnyPfannschmidt changed the title [WIP] don`t parse compat properties as fixtures don`t parse compat properties as fixtures Oct 31, 2018
@nicoddemus nicoddemus merged commit 0fea71a into pytest-dev:master Oct 31, 2018
@RonnyPfannschmidt RonnyPfannschmidt deleted the nowarn-session-attributes branch October 31, 2018 17:40
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