diff options
author | Marco Poletti <poletti.marco@gmail.com> | 2019-12-22 21:02:04 -0800 |
---|---|---|
committer | Marco Poletti <poletti.marco@gmail.com> | 2019-12-22 21:02:09 -0800 |
commit | 7831fb53dd49348af0ecc649025193dc3678d9b2 (patch) | |
tree | b71785ff192d3eefc2bf0fd3dbd0afc8742bffa9 /tests | |
parent | 890658eebd952300fae3444e287056f2e7a5e50b (diff) | |
download | google-fruit-7831fb53dd49348af0ecc649025193dc3678d9b2.tar.gz |
Use os.getcwd() instead of env["PWD"] in testing code so that tests also work on Windows.
Diffstat (limited to 'tests')
-rw-r--r-- | tests/fruit_test_common.py | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/tests/fruit_test_common.py b/tests/fruit_test_common.py index 28ecc59..0c4018b 100644 --- a/tests/fruit_test_common.py +++ b/tests/fruit_test_common.py @@ -35,7 +35,7 @@ run_under_valgrind = RUN_TESTS_UNDER_VALGRIND.lower() not in ('false', 'off', 'n def pretty_print_command(command, env): return 'cd %s; env -i %s %s' % ( - shlex.quote(env['PWD']), + shlex.quote(os.getcwd()), ' '.join('%s=%s' % (var_name, shlex.quote(value)) for var_name, value in env.items() if var_name != 'PWD'), ' '.join(shlex.quote(x) for x in command)) |