Fix tests on Windows Python 3.8

This commit is contained in:
mayeut
2019-11-09 12:16:25 +01:00
parent 319aee73f2
commit ce93a03098
+6 -2
View File
@@ -1,3 +1,4 @@
import os
from cibuildwheel.environment import parse_environment
@@ -37,12 +38,15 @@ def test_inheritance():
def test_shell_eval():
environment_recipe = parse_environment('VAR="$(echo "a test" string)"')
env_copy = os.environ.copy()
env_copy.pop('VAR', None)
environment_dict = environment_recipe.as_dictionary(
prev_environment={}
prev_environment=env_copy
)
environment_cmds = environment_recipe.as_shell_commands()
assert environment_dict == {'VAR': 'a test string'}
assert environment_dict['VAR'] == 'a test string'
assert environment_cmds == ['export VAR="$(echo "a test" string)"']
def test_shell_eval_and_env():