summaryrefslogtreecommitdiffstats
path: root/Lib
diff options
context:
space:
mode:
authorGregory P. Smith <greg@mad-scientist.com>2010-05-09 03:36:42 (GMT)
committerGregory P. Smith <greg@mad-scientist.com>2010-05-09 03:36:42 (GMT)
commit3ea0062e0b207be3569827e87974fb9fab6dd5b1 (patch)
tree5de16e337d962dbe0a9332b0b50be94f6a67624a /Lib
parent31191a9cc520fd39edf9e23b5fd410df3c41a4d8 (diff)
downloadcpython-3ea0062e0b207be3569827e87974fb9fab6dd5b1.zip
cpython-3ea0062e0b207be3569827e87974fb9fab6dd5b1.tar.gz
cpython-3ea0062e0b207be3569827e87974fb9fab6dd5b1.tar.bz2
Replace /s with os.sep in the new internal_execvpe test. Hopefully fixes
this test on windows.
Diffstat (limited to 'Lib')
-rw-r--r--Lib/test/test_os.py13
1 files changed, 8 insertions, 5 deletions
diff --git a/Lib/test/test_os.py b/Lib/test/test_os.py
index b7d819a..3e958f2 100644
--- a/Lib/test/test_os.py
+++ b/Lib/test/test_os.py
@@ -653,7 +653,7 @@ class ExecTests(unittest.TestCase):
raise OSError(errno.ENOTDIR, "execve called")
def _mock_get_exec_path(self, env=None):
- return ['/p', '/pp']
+ return [os.sep+'p', os.sep+'pp']
def __enter__(self):
self.orig_execv = os.execv
@@ -673,13 +673,16 @@ class ExecTests(unittest.TestCase):
def test_internal_execvpe(self):
exec_stubbed = self._stub_out_for_execvpe_test()
with exec_stubbed:
- self.assertRaises(RuntimeError, os._execvpe, '/f', ['-a'])
- self.assertEqual([('execv', '/f', (['-a'],))], exec_stubbed.calls)
+ self.assertRaises(RuntimeError, os._execvpe, os.sep+'f', ['-a'])
+ self.assertEqual([('execv', os.sep+'f', (['-a'],))],
+ exec_stubbed.calls)
exec_stubbed.calls = []
self.assertRaises(OSError, os._execvpe, 'f', ['-a'],
env={'spam': 'beans'})
- self.assertEqual([('execve', '/p/f', (['-a'], {'spam': 'beans'})),
- ('execve', '/pp/f', (['-a'], {'spam': 'beans'}))],
+ self.assertEqual([('execve', os.sep+'p'+os.sep+'f',
+ (['-a'], {'spam': 'beans'})),
+ ('execve', os.sep+'pp'+os.sep+'f',
+ (['-a'], {'spam': 'beans'}))],
exec_stubbed.calls)
class Win32ErrorTests(unittest.TestCase):