fix pytest issue347: slaves running on top of Python3.2
will set PYTHONDONTWRITEYBTECODE to 1 to avoid import concurrency bugs.
This commit is contained in:
@@ -9,6 +9,10 @@
|
||||
- fix pytest issue41: re-run tests on all file changes, not just
|
||||
randomly select ones like .py/.c.
|
||||
|
||||
- fix pytest issue347: slaves running on top of Python3.2
|
||||
will set PYTHONDONTWRITEYBTECODE to 1 to avoid import concurrency
|
||||
bugs.
|
||||
|
||||
1.8
|
||||
-------------------------
|
||||
|
||||
|
||||
@@ -125,6 +125,10 @@ def remote_initconfig(option_dict, args):
|
||||
|
||||
|
||||
if __name__ == '__channelexec__':
|
||||
# python3.2 is not concurrent import safe, so let's play it safe
|
||||
# https://bitbucket.org/hpk42/pytest/issue/347/pytest-xdist-and-python-32
|
||||
if sys.version_info[:2] == (3,2):
|
||||
os.environ["PYTHONDONTWRITEBYTECODE"] = 1
|
||||
slaveinput,args,option_dict = channel.receive()
|
||||
importpath = os.getcwd()
|
||||
sys.path.insert(0, importpath) # XXX only for remote situations
|
||||
|
||||
Reference in New Issue
Block a user