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

don`t parse compat properties as fixtures #4164

Merged

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 ^^

this avoid triggering the warnings when parsing the session node as session plugin
@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