[Python-checkins] r64412 - python/trunk/Lib/test/test_site.py

amaury.forgeotdarc python-checkins at python.org
Thu Jun 19 23:17:12 CEST 2008


Author: amaury.forgeotdarc
Date: Thu Jun 19 23:17:12 2008
New Revision: 64412

Log:
In test_site, correctly escape backslashes in path names.
This allows the test to pass when the username begins with a lowercase 't'...


Modified:
   python/trunk/Lib/test/test_site.py

Modified: python/trunk/Lib/test/test_site.py
==============================================================================
--- python/trunk/Lib/test/test_site.py	(original)
+++ python/trunk/Lib/test/test_site.py	Thu Jun 19 23:17:12 2008
@@ -101,17 +101,17 @@
         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)
 


More information about the Python-checkins mailing list