Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
N
neoppod
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
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Analytics
Analytics
CI / CD
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Ivan Tyagov
neoppod
Commits
36a32f23
Commit
36a32f23
authored
Sep 30, 2015
by
Julien Muchembled
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
tests: add "last" symlink to last temporary directory
parent
518c7588
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
9 additions
and
1 deletion
+9
-1
neo/tests/__init__.py
neo/tests/__init__.py
+9
-1
No files found.
neo/tests/__init__.py
View file @
36a32f23
...
@@ -103,13 +103,21 @@ def getTempDirectory():
...
@@ -103,13 +103,21 @@ def getTempDirectory():
except
KeyError
:
except
KeyError
:
neo_dir
=
os
.
path
.
join
(
tempfile
.
gettempdir
(),
'neo_tests'
)
neo_dir
=
os
.
path
.
join
(
tempfile
.
gettempdir
(),
'neo_tests'
)
while
True
:
while
True
:
temp_dir
=
os
.
path
.
join
(
neo_dir
,
repr
(
time
()))
temp_name
=
repr
(
time
())
temp_dir
=
os
.
path
.
join
(
neo_dir
,
temp_name
)
try
:
try
:
os
.
makedirs
(
temp_dir
)
os
.
makedirs
(
temp_dir
)
break
break
except
OSError
,
e
:
except
OSError
,
e
:
if
e
.
errno
!=
errno
.
EEXIST
:
if
e
.
errno
!=
errno
.
EEXIST
:
raise
raise
last
=
os
.
path
.
join
(
neo_dir
,
"last"
)
try
:
os
.
remove
(
last
)
except
OSError
,
e
:
if
e
.
errno
!=
errno
.
ENOENT
:
raise
os
.
symlink
(
temp_name
,
last
)
os
.
environ
[
'TEMP'
]
=
temp_dir
os
.
environ
[
'TEMP'
]
=
temp_dir
print
'Using temp directory %r.'
%
temp_dir
print
'Using temp directory %r.'
%
temp_dir
return
temp_dir
return
temp_dir
...
...
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