]> granicus.if.org Git - python/commitdiff
In test_site, correctly escape backslashes in path names.
authorAmaury Forgeot d'Arc <amauryfa@gmail.com>
Thu, 19 Jun 2008 21:17:12 +0000 (21:17 +0000)
committerAmaury Forgeot d'Arc <amauryfa@gmail.com>
Thu, 19 Jun 2008 21:17:12 +0000 (21:17 +0000)
This allows the test to pass when the username begins with a lowercase 't'...

Lib/test/test_site.py

index 6adb2075083763fa3efce3c3c6a635644fa59d53..08d0c629d1404cf16dff61096e1b47e80b30a140 100644 (file)
@@ -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)