From: Amaury Forgeot d'Arc Date: Thu, 19 Jun 2008 21:17:12 +0000 (+0000) Subject: In test_site, correctly escape backslashes in path names. X-Git-Tag: v2.6b2~225 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=9b69ed9d6733aacca64d043f555af263f98b7df6;p=thirdparty%2FPython%2Fcpython.git In test_site, correctly escape backslashes in path names. This allows the test to pass when the username begins with a lowercase 't'... --- diff --git a/Lib/test/test_site.py b/Lib/test/test_site.py index 6adb20750837..08d0c629d140 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)