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

tests: make test_crash_on_closing_tmpfile_py27 more reliable #4878

Merged

Conversation

blueyed
Copy link
Contributor

@blueyed blueyed commented Mar 3, 2019

It fails reliable for me now without the fix from 9517c3a, and had
actually a wrong assertion in the end.

Ref: #2370

@codecov
Copy link

codecov bot commented Mar 3, 2019

Codecov Report

Merging #4878 into master will increase coverage by 0.06%.
The diff coverage is 100%.

Impacted file tree graph

@@            Coverage Diff             @@
##           master    #4878      +/-   ##
==========================================
+ Coverage   94.48%   94.54%   +0.06%     
==========================================
  Files         113      113              
  Lines       25172    25173       +1     
  Branches     2499     2499              
==========================================
+ Hits        23783    23801      +18     
+ Misses       1059     1047      -12     
+ Partials      330      325       -5
Impacted Files Coverage Δ
testing/test_capture.py 99.24% <100%> (ø) ⬆️
src/_pytest/cacheprovider.py 96.22% <0%> (+0.47%) ⬆️
src/_pytest/terminal.py 91.74% <0%> (+2.64%) ⬆️

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 f3f6cb2...83558a0. Read the comment docs.

@blueyed
Copy link
Contributor Author

blueyed commented Mar 4, 2019

It was not failing on CI anymore, but looked like it was not covered. added a todo for diff coverage.

But maybe it would be better to just monkeypatch f.close to raise IOError reliably?

@nicoddemus
Copy link
Member

But maybe it would be better to just monkeypatch f.close to raise IOError reliably?

Hmm that's an idea. Let's see, if this gets flaky we might go down that route, otherwise I'm fine with the code as it is.

It fails reliable for me now without the fix from 9517c3a.

Ref: pytest-dev#2370
@blueyed blueyed force-pushed the fix-test_crash_on_closing_tmpfile_py27 branch from 9e8496d to 83558a0 Compare March 4, 2019 14:05
@blueyed
Copy link
Contributor Author

blueyed commented Mar 4, 2019

Ok, squashed.
Let's merge it when it stays green.

@blueyed blueyed merged commit 54c70bc into pytest-dev:master Mar 4, 2019
@blueyed blueyed deleted the fix-test_crash_on_closing_tmpfile_py27 branch March 4, 2019 15:22
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.

2 participants