[py23_test] pass os.environ copy instead of empty dict to avoid issue on Windows

Otherwise I get this:
Fatal Python error: Failed to initialize Windows random API (CryptoGen)

https://ci.appveyor.com/project/anthrotype/fonttools/build/job/qhf8d89or4d5hiyd

see: http://bugs.python.org/issue20614
This commit is contained in:
Cosimo Lupo 2016-02-06 23:13:22 +00:00
parent 4a783326b8
commit 7c6744e639

View File

@ -36,9 +36,11 @@ class OpenFuncWrapperTest(unittest.TestCase):
try:
with open(datafile, 'rb') as infile, \
tempfile.NamedTemporaryFile(delete=False) as outfile:
env = dict(os.environ)
env["PYTHONPATH"] = os.pathsep.join(sys.path)
check_call(
[sys.executable, script], stdin=infile, stdout=outfile,
env={"PYTHONPATH": os.pathsep.join(sys.path)})
env=env)
result = not filecmp.cmp(infile.name, outfile.name, shallow=False)
finally:
os.remove(script)