Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
G
gevent
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
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
Kirill Smelkov
gevent
Commits
0ca2eb98
Commit
0ca2eb98
authored
Aug 29, 2012
by
Denis Bilenko
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
copy the test file itself into temp dir, as some tests do open(__file__)
parent
6cca080f
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
5 additions
and
4 deletions
+5
-4
greentest/helper.py
greentest/helper.py
+5
-4
No files found.
greentest/helper.py
View file @
0ca2eb98
...
...
@@ -5,9 +5,9 @@ import tempfile
import
glob
from
pipes
import
quote
chdir
=
os
.
path
.
join
(
tempfile
.
gettempdir
(),
'gevent-test'
)
CHDIR
=
os
.
path
.
join
(
tempfile
.
gettempdir
(),
'gevent-test'
)
try
:
os
.
makedirs
(
chdir
)
os
.
makedirs
(
CHDIR
)
except
EnvironmentError
:
pass
...
...
@@ -84,8 +84,9 @@ def prepare_stdlib_test(filename, assets=None):
print
>>
sys
.
stderr
,
'Testing %s with monkey patching'
%
_filename
os
.
system
(
'cp %s %s'
%
(
quote
(
filename
),
quote
(
os
.
path
.
join
(
CHDIR
,
os
.
path
.
basename
(
filename
)))))
os
.
chdir
(
CHDIR
)
copy_assets
(
os
.
path
.
dirname
(
_filename
),
assets
)
os
.
chdir
(
chdir
)
return
module_code
...
...
@@ -97,7 +98,7 @@ def copy_assets(directory, assets):
if
isinstance
(
assets
,
basestring
):
assets
=
glob
.
glob
(
assets
)
for
asset
in
assets
:
os
.
system
(
'cp -r %s %s'
%
(
quote
(
asset
),
quote
(
os
.
path
.
join
(
chdir
,
asset
))))
os
.
system
(
'cp -r %s %s'
%
(
quote
(
asset
),
quote
(
os
.
path
.
join
(
CHDIR
,
asset
))))
finally
:
os
.
chdir
(
cwd
)
...
...
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