aboutsummaryrefslogtreecommitdiff
path: root/tests
diff options
context:
space:
mode:
authorMarco Poletti <poletti.marco@gmail.com>2019-12-22 21:02:04 -0800
committerMarco Poletti <poletti.marco@gmail.com>2019-12-22 21:02:09 -0800
commit7831fb53dd49348af0ecc649025193dc3678d9b2 (patch)
treeb71785ff192d3eefc2bf0fd3dbd0afc8742bffa9 /tests
parent890658eebd952300fae3444e287056f2e7a5e50b (diff)
downloadgoogle-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.py2
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))