Skip to content

Conversation

@blueyed
Copy link
Contributor

@blueyed blueyed commented Oct 10, 2018

No description provided.

@coveralls
Copy link

coveralls commented Oct 10, 2018

Coverage Status

Coverage increased (+0.02%) to 93.805% when pulling 52ff1ea on blueyed:conftest into 602e74c on pytest-dev:features.

@codecov
Copy link

codecov bot commented Oct 10, 2018

Codecov Report

Merging #4103 into features will increase coverage by 0.18%.
The diff coverage is 100%.

Impacted file tree graph

@@             Coverage Diff              @@
##           features    #4103      +/-   ##
============================================
+ Coverage     94.37%   94.56%   +0.18%     
============================================
  Files           109      109              
  Lines         23942    23943       +1     
  Branches       2363     2363              
============================================
+ Hits          22596    22642      +46     
+ Misses         1028      995      -33     
+ Partials        318      306      -12
Flag Coverage Δ
#doctesting 29.18% <100%> (+0.83%) ⬆️
#linux 94.42% <100%> (+0.04%) ⬆️
#nobyte 0% <ø> (ø) ⬆️
#numpy 28.08% <76.92%> (+0.14%) ⬆️
#pexpect 0% <ø> (ø) ⬆️
#py27 92.68% <100%> (+0.15%) ⬆️
#py34 92.11% <100%> (+0.15%) ⬆️
#py35 92.12% <100%> (+0.15%) ⬆️
#py36 92.69% <100%> (+0.2%) ⬆️
#py37 92.33% <100%> (+0.2%) ⬆️
#trial 31.32% <100%> (+0.29%) ⬆️
#windows 93.87% <100%> (?)
#xdist 18.7% <61.53%> (+0.08%) ⬆️
Impacted Files Coverage Δ
src/_pytest/config/__init__.py 92.38% <100%> (+0.01%) ⬆️
src/_pytest/fixtures.py 97.3% <0%> (+0.26%) ⬆️
testing/test_capture.py 99.24% <0%> (+0.3%) ⬆️
src/_pytest/pytester.py 86.37% <0%> (+0.43%) ⬆️
testing/acceptance_test.py 97.8% <0%> (+0.65%) ⬆️
src/_pytest/nodes.py 94.62% <0%> (+0.82%) ⬆️
src/_pytest/terminal.py 91.62% <0%> (+1.74%) ⬆️
src/_pytest/capture.py 89.93% <0%> (+3.2%) ⬆️
testing/test_tmpdir.py 100% <0%> (+4.93%) ⬆️
src/_pytest/paths.py 100% <0%> (+8.69%) ⬆️
... 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 602e74c...52ff1ea. Read the comment docs.

@blueyed
Copy link
Contributor Author

blueyed commented Oct 10, 2018

Not sure about the optimization (came up with this while debugging it).
It changes the behavior to only cache directories now.

@blueyed blueyed changed the title [WIP] conftest: handle symlinks [RFC] conftest: optimize _getconftestmodules Oct 10, 2018
if self._noconftest:
return []

if path.isfile():
Copy link
Member

Choose a reason for hiding this comment

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

just use if/else to set directory instead of recursing

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Yeah.
Do you agree with the change in general though? (to only cache dirs)

Copy link
Member

Choose a reason for hiding this comment

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

as far as i can tell it nicely trims down cache size and just makes sense

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Cool, amended.

@blueyed blueyed changed the title [RFC] conftest: optimize _getconftestmodules conftest: optimize _getconftestmodules Oct 10, 2018
@blueyed blueyed merged commit b394066 into pytest-dev:features Oct 11, 2018
@blueyed blueyed deleted the conftest branch October 11, 2018 11:52
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