Improve test for Travis fallback
This commit is contained in:
@@ -45,7 +45,7 @@ def test_auto_detect_cpus(testdir, monkeypatch):
|
|||||||
config = testdir.parseconfigure("-nauto")
|
config = testdir.parseconfigure("-nauto")
|
||||||
assert config.getoption('numprocesses') == 99
|
assert config.getoption('numprocesses') == 99
|
||||||
|
|
||||||
if not hasattr(os, 'sched_getaffinity'):
|
monkeypatch.delattr(os, 'sched_getaffinity', raising=False)
|
||||||
monkeypatch.setenv('TRAVIS', 'true')
|
monkeypatch.setenv('TRAVIS', 'true')
|
||||||
config = testdir.parseconfigure("-nauto")
|
config = testdir.parseconfigure("-nauto")
|
||||||
assert config.getoption('numprocesses') == 2
|
assert config.getoption('numprocesses') == 2
|
||||||
|
|||||||
Reference in New Issue
Block a user