Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
N
neo
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Labels
Merge Requests
2
Merge Requests
2
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Analytics
Analytics
CI / CD
Repository
Value Stream
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Jobs
Commits
Open sidebar
Kirill Smelkov
neo
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
Show 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