Workaround cpu detection on Travis CI

Closes #316
This commit is contained in:
Sergey B Kirpichev
2018-07-25 19:05:19 +03:00
parent 46119eb593
commit c950d88204
2 changed files with 6 additions and 0 deletions

1
changelog/316.bugfix Normal file
View File

@@ -0,0 +1 @@
Workaround cpu detection on Travis CI

View File

@@ -1,3 +1,5 @@
import os
import py
import pytest
@@ -7,6 +9,9 @@ def parse_numprocesses(s):
try:
from os import sched_getaffinity
except ImportError:
if os.environ.get('TRAVIS') == 'true':
# workaround https://bitbucket.org/pypy/pypy/issues/2375
return 2
try:
from os import cpu_count
except ImportError: