Skip to content

Commit 5eb85ef

Browse files
committed
Use -n auto now that xdist behaves well in Travis and AppVeyor
This hopefully fixes the flaky test_idval_hypothesis on AppVeyor Fix #3707
1 parent e0466d0 commit 5eb85ef

File tree

2 files changed

+6
-6
lines changed

2 files changed

+6
-6
lines changed

testing/python/metafunc.py

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -211,9 +211,6 @@ class A(object):
211211
@hypothesis.settings(
212212
deadline=400.0
213213
) # very close to std deadline and CI boxes are not reliable in CPU power
214-
@pytest.mark.xfail(
215-
sys.platform.startswith("win32"), reason="flaky #3707", strict=False
216-
)
217214
def test_idval_hypothesis(self, value):
218215
from _pytest.python import _idval
219216

tox.ini

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -40,8 +40,9 @@ deps =
4040
pytest-xdist>=1.13
4141
mock
4242
nose
43+
passenv = USER USERNAME TRAVIS
4344
commands =
44-
pytest -n3 -ra --runpytest=subprocess {posargs:testing}
45+
pytest -n auto -ra --runpytest=subprocess {posargs:testing}
4546

4647

4748
[testenv:linting]
@@ -58,8 +59,9 @@ deps =
5859
hypothesis>=3.56
5960
{env:_PYTEST_TOX_EXTRA_DEP:}
6061
whitelist_externals = env
62+
passenv = USER USERNAME TRAVIS
6163
commands =
62-
{env:_PYTEST_TOX_COVERAGE_RUN:} pytest -n8 -ra {posargs:testing}
64+
{env:_PYTEST_TOX_COVERAGE_RUN:} pytest -n auto -ra {posargs:testing}
6365

6466
[testenv:py36-xdist]
6567
deps = {[testenv:py27-xdist]deps}
@@ -93,8 +95,9 @@ setenv =
9395
{[testenv]setenv}
9496
PYTHONDONTWRITEBYTECODE=1
9597
whitelist_externals = env
98+
passenv = USER USERNAME TRAVIS
9699
commands =
97-
{env:_PYTEST_TOX_COVERAGE_RUN:} pytest -n3 -ra {posargs:.}
100+
{env:_PYTEST_TOX_COVERAGE_RUN:} pytest -n auto -ra {posargs:.}
98101

99102
[testenv:py27-trial]
100103
deps =

0 commit comments

Comments
 (0)