Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
C
cpython
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
Analytics
Analytics
Repository
Value Stream
Wiki
Wiki
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
Kirill Smelkov
cpython
Commits
3ea0062e
Commit
3ea0062e
authored
May 09, 2010
by
Gregory P. Smith
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Replace /s with os.sep in the new internal_execvpe test. Hopefully fixes
this test on windows.
parent
31191a9c
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
8 additions
and
5 deletions
+8
-5
Lib/test/test_os.py
Lib/test/test_os.py
+8
-5
No files found.
Lib/test/test_os.py
View file @
3ea0062e
...
...
@@ -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
):
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment