diff options
author | Amaury Forgeot d'Arc <amauryfa@gmail.com> | 2008-06-19 21:17:12 (GMT) |
---|---|---|
committer | Amaury Forgeot d'Arc <amauryfa@gmail.com> | 2008-06-19 21:17:12 (GMT) |
commit | 9b69ed9d6733aacca64d043f555af263f98b7df6 (patch) | |
tree | 0c6811676c08db329f484c64400114746a6abbb3 /Lib/test/test_site.py | |
parent | 8e5cd75b732d94cbdfa6dcb3083277396f90c052 (diff) | |
download | cpython-9b69ed9d6733aacca64d043f555af263f98b7df6.zip cpython-9b69ed9d6733aacca64d043f555af263f98b7df6.tar.gz cpython-9b69ed9d6733aacca64d043f555af263f98b7df6.tar.bz2 |
In test_site, correctly escape backslashes in path names.
This allows the test to pass when the username begins with a lowercase 't'...
Diffstat (limited to 'Lib/test/test_site.py')
-rw-r--r-- | Lib/test/test_site.py | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/Lib/test/test_site.py b/Lib/test/test_site.py index 6adb207..08d0c62 100644 --- a/Lib/test/test_site.py +++ b/Lib/test/test_site.py @@ -101,17 +101,17 @@ class HelperFunctionsTests(unittest.TestCase): self.assert_(usersite in sys.path) rc = subprocess.call([sys.executable, '-c', - 'import sys; sys.exit("%s" in sys.path)' % usersite]) + 'import sys; sys.exit(%r in sys.path)' % usersite]) self.assertEqual(rc, 1) rc = subprocess.call([sys.executable, '-s', '-c', - 'import sys; sys.exit("%s" in sys.path)' % usersite]) + 'import sys; sys.exit(%r in sys.path)' % usersite]) self.assertEqual(rc, 0) env = os.environ.copy() env["PYTHONNOUSERSITE"] = "1" rc = subprocess.call([sys.executable, '-c', - 'import sys; sys.exit("%s" in sys.path)' % usersite], + 'import sys; sys.exit(%r in sys.path)' % usersite], env=env) self.assertEqual(rc, 0) |