Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
C
cython
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
Boxiang Sun
cython
Commits
bbfbddbc
Commit
bbfbddbc
authored
May 16, 2008
by
Stefan Behnel
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
keep tests from different directories separate to prevent overwriting files with the same name
parent
d467013c
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
9 additions
and
6 deletions
+9
-6
runtests.py
runtests.py
+9
-6
No files found.
runtests.py
View file @
bbfbddbc
...
...
@@ -55,6 +55,12 @@ class TestBuilder(object):
return
suite
def
handle_directory
(
self
,
path
,
context
):
workdir
=
os
.
path
.
join
(
self
.
workdir
,
context
)
if
not
os
.
path
.
exists
(
workdir
):
os
.
makedirs
(
workdir
)
if
workdir
not
in
sys
.
path
:
sys
.
path
.
insert
(
0
,
workdir
)
expect_errors
=
(
context
==
'errors'
)
suite
=
unittest
.
TestSuite
()
filenames
=
os
.
listdir
(
path
)
...
...
@@ -69,10 +75,10 @@ class TestBuilder(object):
continue
if
context
in
TEST_RUN_DIRS
:
test
=
CythonRunTestCase
(
path
,
self
.
workdir
,
module
,
self
.
annotate
)
path
,
workdir
,
module
,
self
.
annotate
)
else
:
test
=
CythonCompileTestCase
(
path
,
self
.
workdir
,
module
,
expect_errors
,
self
.
annotate
)
path
,
workdir
,
module
,
expect_errors
,
self
.
annotate
)
suite
.
addTest
(
test
)
return
suite
...
...
@@ -89,7 +95,7 @@ class CythonCompileTestCase(unittest.TestCase):
def
shortDescription
(
self
):
return
"compiling "
+
self
.
module
def
tearDown
(
self
):
def
_
tearDown
(
self
):
if
os
.
path
.
exists
(
self
.
workdir
):
for
rmfile
in
os
.
listdir
(
self
.
workdir
):
if
self
.
annotate
and
rmfile
.
endswith
(
".html"
):
...
...
@@ -218,9 +224,6 @@ if __name__ == '__main__':
shutil
.
rmtree
(
WORKDIR
,
ignore_errors
=
True
)
os
.
makedirs
(
WORKDIR
)
if
not
sys
.
path
or
sys
.
path
[
0
]
!=
WORKDIR
:
sys
.
path
.
insert
(
0
,
WORKDIR
)
print
"Running tests against Cython %s"
%
version
print
"Python"
,
sys
.
version
print
...
...
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