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

Fix rmtree to remove directories with read-only files #5588

Merged
merged 1 commit into from
Jul 11, 2019

Conversation

nicoddemus
Copy link
Member

Fix #5524

src/_pytest/pathlib.py Outdated Show resolved Hide resolved
@codecov
Copy link

codecov bot commented Jul 10, 2019

Codecov Report

Merging #5588 into master will increase coverage by 2.26%.
The diff coverage is 92.45%.

Impacted file tree graph

@@            Coverage Diff             @@
##           master    #5588      +/-   ##
==========================================
+ Coverage   93.84%   96.11%   +2.26%     
==========================================
  Files         117      117              
  Lines       25733    25775      +42     
  Branches     2493     2495       +2     
==========================================
+ Hits        24149    24773     +624     
+ Misses       1256      697     -559     
+ Partials      328      305      -23
Impacted Files Coverage Δ
src/_pytest/cacheprovider.py 97.8% <100%> (ø) ⬆️
testing/test_tmpdir.py 98.52% <100%> (+4.7%) ⬆️
src/_pytest/pathlib.py 87.89% <81.81%> (-1.19%) ⬇️
src/_pytest/fixtures.py 97.52% <0%> (+0.13%) ⬆️
src/_pytest/python.py 93% <0%> (+0.24%) ⬆️
testing/test_config.py 99.83% <0%> (+0.33%) ⬆️
src/_pytest/config/__init__.py 94.62% <0%> (+0.48%) ⬆️
src/_pytest/assertion/rewrite.py 96.11% <0%> (+0.52%) ⬆️
testing/test_pytester.py 89.27% <0%> (+0.57%) ⬆️
testing/test_runner.py 96.12% <0%> (+0.64%) ⬆️
... and 22 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 26b06bd...37c3796. Read the comment docs.

@nicoddemus nicoddemus force-pushed the ro-tmpdir-5524 branch 2 times, most recently from 75eefd6 to eccaf23 Compare July 10, 2019 19:19
@nicoddemus nicoddemus added the needs backport applied to PRs, indicates that it should be ported to the current bug-fix branch label Jul 10, 2019
Copy link
Member

@RonnyPfannschmidt RonnyPfannschmidt left a comment

Choose a reason for hiding this comment

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

lovely, thanks

@nicoddemus nicoddemus merged commit 4027254 into pytest-dev:master Jul 11, 2019
nicoddemus added a commit to nicoddemus/pytest that referenced this pull request Jul 11, 2019
Fix rmtree to remove directories with read-only files
@nicoddemus nicoddemus deleted the ro-tmpdir-5524 branch July 11, 2019 22:08
@nicoddemus
Copy link
Member Author

Backport: #5597

@nicoddemus nicoddemus added backported and removed needs backport applied to PRs, indicates that it should be ported to the current bug-fix branch labels Jul 11, 2019
nicoddemus added a commit that referenced this pull request Jul 11, 2019
[4.6] Fix rmtree to remove directories with read-only files (#5588)
@blueyed
Copy link
Contributor

blueyed commented Jul 18, 2019

See #5626 for an issue with this.

The-Compiler added a commit to qutebrowser/qutebrowser that referenced this pull request Sep 12, 2019
pytest shows warnings because the directory isn't removable:
pytest-dev/pytest#5588

Make sure it's writable after the test completed.
The-Compiler added a commit to qutebrowser/qutebrowser that referenced this pull request Sep 12, 2019
pytest shows warnings in newer versions because those directories/files can't
be removed:

pytest-dev/pytest#5588

Make sure they're writable again after the test completed by using a fixture
which does proper cleanup.
The-Compiler added a commit to qutebrowser/qutebrowser that referenced this pull request Sep 12, 2019
pytest shows warnings in newer versions because those directories/files can't
be removed:

pytest-dev/pytest#5588

Make sure they're writable again after the test completed by using a fixture
which does proper cleanup.
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.

Race condition error while creating basetemp concurrently
3 participants