Skip to content

Move handling of duplicate files#4241

Merged
nicoddemus merged 1 commit into
pytest-dev:featuresfrom
blueyed:move-duplicates
Oct 26, 2018
Merged

Move handling of duplicate files#4241
nicoddemus merged 1 commit into
pytest-dev:featuresfrom
blueyed:move-duplicates

Conversation

@blueyed

@blueyed blueyed commented Oct 25, 2018

Copy link
Copy Markdown
Contributor

This removes the hack added in
#3802.

This also improves performance a bit with the test case for #4237:
Before: 7.95s
After: 7.51s

@nicoddemus

Copy link
Copy Markdown
Member

Cool 👍

@blueyed

blueyed commented Oct 25, 2018

Copy link
Copy Markdown
Contributor Author

One failing test: https://travis-ci.org/pytest-dev/pytest/jobs/446299602#L1014 - maybe just needs adjustment?

@blueyed

blueyed commented Oct 25, 2018

Copy link
Copy Markdown
Contributor Author

It has an additional <ParsedCall 'pytest_collectstart'(**{'collector': <Package '/tmp/pytest-of-user/pytest-310/test_collect_only_with_various_situations0'>})>, now:

[<ParsedCall 'pytest_collectstart'(**{'collector': <Session 'test_collect_only_with_various_situations0'>})>,
 <ParsedCall 'pytest_collectstart'(**{'collector': <Package '/tmp/pytest-of-user/pytest-310/test_collect_only_with_various_situations0'>})>,
 <ParsedCall 'pytest_collectstart'(**{'collector': <Module 'test_one.py'>})>,
 <ParsedCall 'pytest_collectstart'(**{'collector': <Class 'TestX'>})>,
 <ParsedCall 'pytest_collectstart'(**{'collector': <Instance '()'>})>,
 <ParsedCall 'pytest_collectstart'(**{'collector': <Class 'TestY'>})>,
 <ParsedCall 'pytest_collectstart'(**{'collector': <Instance '()'>})>,
 <ParsedCall 'pytest_collectstart'(**{'collector': <Module 'test_three.py'>})>]

@blueyed

blueyed commented Oct 25, 2018

Copy link
Copy Markdown
Contributor Author

It was changed to 8 in 2b14108 (Add package scoped fixtures #2283) - which makes sense, but then to 7 again in fedc785 (#3389), likely not intentional?! (ping @jonozzz).

This removes the hack added in pytest-dev#3802.

Adjusts test:

- it appears to not have been changed to 7 intentionally.
- removes XXX comment, likely not relevant anymore since 6dac774.
@blueyed

blueyed commented Oct 25, 2018

Copy link
Copy Markdown
Contributor Author

Went ahead and amended the test, but please ACK.

@jonozzz

jonozzz commented Oct 25, 2018

Copy link
Copy Markdown

Not sure why there's an extra node in there now.

@blueyed

blueyed commented Oct 25, 2018

Copy link
Copy Markdown
Contributor Author

@jonozzz
It was changed in fedc785#diff-7eb3d34b4de135c7f717e983c8282210R195 (by you I've assumed - renamed username, or am I wrong)?

@jonozzz

jonozzz commented Oct 25, 2018

Copy link
Copy Markdown

Went down the blame road, and it's funny that ~8 years ago it started as "== 8" then 3 years ago changed to 7, then 8, 7 and now back to 8. Something's going on in there :)

@blueyed

blueyed commented Oct 25, 2018

Copy link
Copy Markdown
Contributor Author

Yeah.

I think the initial 8 was due to the "XXX" comment that appears to have been addressed when it changed to 7, and then it went to 8 again when package collection was added.
The question now is why it was changed to 7 again. This might have been accidental, and now that I am removing the HACK here it works as expected again? (i.e. 8)

@codecov

codecov Bot commented Oct 25, 2018

Copy link
Copy Markdown

Codecov Report

Merging #4241 into features will decrease coverage by 0.22%.
The diff coverage is 100%.

Impacted file tree graph

@@             Coverage Diff              @@
##           features    #4241      +/-   ##
============================================
- Coverage     95.77%   95.54%   -0.23%     
============================================
  Files           109      109              
  Lines         24351    24348       -3     
  Branches       2404     2402       -2     
============================================
- Hits          23322    23264      -58     
- Misses          733      772      +39     
- Partials        296      312      +16
Flag Coverage Δ
#docs ?
#doctesting ?
#linting ?
#linux 95.54% <100%> (-0.01%) ⬇️
#nobyte 91.08% <100%> (-0.66%) ⬇️
#numpy 41.32% <42.85%> (-51.55%) ⬇️
#pexpect 41.32% <42.85%> (-0.01%) ⬇️
#py27 93.77% <100%> (-0.12%) ⬇️
#py34 91.96% <100%> (-0.08%) ⬇️
#py35 91.98% <100%> (-0.08%) ⬇️
#py36 93.66% <100%> (-0.19%) ⬇️
#py37 92.16% <100%> (+0.05%) ⬆️
#trial 41.32% <42.85%> (-51.55%) ⬇️
#windows ?
#xdist 93.47% <100%> (-0.13%) ⬇️
Impacted Files Coverage Δ
src/_pytest/python.py 95.47% <ø> (-0.27%) ⬇️
src/_pytest/main.py 96.22% <100%> (ø) ⬆️
testing/test_session.py 96.45% <100%> (ø) ⬆️
testing/test_paths.py 86.36% <0%> (-13.64%) ⬇️
src/_pytest/assertion/util.py 92.92% <0%> (-5.19%) ⬇️
testing/test_tmpdir.py 94.03% <0%> (-4.64%) ⬇️
src/_pytest/capture.py 90.16% <0%> (-3.21%) ⬇️
src/_pytest/pathlib.py 87.42% <0%> (-2.4%) ⬇️
testing/acceptance_test.py 97.18% <0%> (-1.09%) ⬇️
src/_pytest/nodes.py 93.9% <0%> (-0.82%) ⬇️
... and 4 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 6dc575f...e041823. Read the comment docs.

@nicoddemus nicoddemus merged commit 8d0e1a9 into pytest-dev:features Oct 26, 2018
@blueyed blueyed deleted the move-duplicates branch November 1, 2018 16:27
blueyed added a commit to blueyed/pytest that referenced this pull request Nov 1, 2018
This removes the hack added in pytest-dev#3802.

Adjusts test:

- it appears to not have been changed to 7 intentionally.
- removes XXX comment, likely not relevant anymore since 6dac774.

Backport of e041823 (pytest-dev#4241)
from features.
blueyed added a commit to blueyed/pytest that referenced this pull request Nov 1, 2018
This removes the hack added in pytest-dev#3802.

Adjusts test:

- it appears to not have been changed to 7 intentionally.
- removes XXX comment, likely not relevant anymore since 6dac774.

Backport of e041823 (pytest-dev#4241)
from features.
blueyed added a commit to blueyed/pytest that referenced this pull request Nov 1, 2018
This removes the hack added in pytest-dev#3802.

Adjusts test:

- it appears to not have been changed to 7 intentionally.
- removes XXX comment, likely not relevant anymore since 6dac774.

Backport of e041823 (pytest-dev#4241)
from features.
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