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

WIP Use a custom cache directory for test_stepwise tests #4378

Closed
wants to merge 1 commit into from

Conversation

nicoddemus
Copy link
Member

Otherwise the tests will use tox's env cache which makes them flaky

Example failure:

https://travis-ci.org/pytest-dev/pytest/jobs/454100204

Otherwise the tests will use tox's env cache which makes them flaky
@RonnyPfannschmidt
Copy link
Member

wrong fix - pytester should fix this in general for everything

@nicoddemus
Copy link
Member Author

wrong fix - pytester should fix this in general for everything

Hmm indeed. Any suggestion on how to do this? I'm thinking of changing the cache_dir attribute directly, as writing a ini file for every test won't work for tests which write their own pytest.ini.

@RonnyPfannschmidt
Copy link
Member

@nicoddemus i believe it would do us good to clean up the env variables

@nicoddemus
Copy link
Member Author

i believe it would do us good to clean up the env variables

Sorry, I'm not following, what do environment variables have to do with the cache dir? 🤔

@RonnyPfannschmidt
Copy link
Member

i was thinking of #4271

@nicoddemus nicoddemus changed the title Use a custom cache directory for test_stepwise tests WIP Use a custom cache directory for test_stepwise tests Nov 12, 2018
@blueyed
Copy link
Contributor

blueyed commented Nov 12, 2018

#4271 appears to not have fixed it by itself: it was merged already with the above failure, no?

@nicoddemus
Copy link
Member Author

In #4271, handle_env is defined in test_cacheprovider.py, the test this PR addresses is in test_stepwise.py.

@blueyed
Copy link
Contributor

blueyed commented Nov 12, 2018

Let's rename it to clean_env or something and move it to conftest then maybe?

@blueyed
Copy link
Contributor

blueyed commented Nov 12, 2018

But maybe pytester by itself could do it already.

@nicoddemus
Copy link
Member Author

But maybe pytester by itself could do it already.

Yeah I think that was @RonnyPfannschmidt's suggestion.

@codecov
Copy link

codecov bot commented Nov 13, 2018

Codecov Report

Merging #4378 into master will increase coverage by 0.02%.
The diff coverage is 100%.

Impacted file tree graph

@@            Coverage Diff             @@
##           master    #4378      +/-   ##
==========================================
+ Coverage   95.82%   95.84%   +0.02%     
==========================================
  Files         111      111              
  Lines       24928    24929       +1     
  Branches     2431     2431              
==========================================
+ Hits        23887    23893       +6     
+ Misses        740      738       -2     
+ Partials      301      298       -3
Flag Coverage Δ
#docs 29.66% <0%> (+0.07%) ⬆️
#doctesting 29.66% <0%> (+0.07%) ⬆️
#linting 29.66% <0%> (+0.07%) ⬆️
#linux 95.67% <100%> (+0.02%) ⬆️
#nobyte 92.33% <100%> (ø) ⬆️
#numpy 94.92% <100%> (+1.98%) ⬆️
#pexpect 41.59% <0%> (+0.02%) ⬆️
#py27 94.03% <100%> (+0.02%) ⬆️
#py34 92.15% <100%> (+0.06%) ⬆️
#py35 92.16% <100%> (+0.06%) ⬆️
#py36 93.9% <100%> (+0.02%) ⬆️
#py37 92.38% <100%> (+0.06%) ⬆️
#trial 94.92% <100%> (+1.98%) ⬆️
#windows 94.09% <100%> (ø) ⬆️
#xdist 93.86% <100%> (+0.12%) ⬆️
Impacted Files Coverage Δ
testing/test_stepwise.py 100% <100%> (ø) ⬆️
src/_pytest/terminal.py 93.02% <0%> (+0.85%) ⬆️

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 93a9836...70a072a. Read the comment docs.

blueyed added a commit to blueyed/pytest that referenced this pull request Nov 13, 2018
@blueyed
Copy link
Contributor

blueyed commented Nov 13, 2018

Follow-up in #4382.

@blueyed blueyed closed this Nov 13, 2018
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