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
Labels
Merge Requests
0
Merge Requests
0
Analytics
Analytics
Repository
Value Stream
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Commits
Open sidebar
nexedi
cython
Commits
6c95459c
Commit
6c95459c
authored
Feb 04, 2011
by
Robert Bradshaw
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Runtest cleanup for different testing environments.
parent
521f3bb9
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
7 additions
and
6 deletions
+7
-6
runtests.py
runtests.py
+7
-6
No files found.
runtests.py
View file @
6c95459c
...
...
@@ -177,7 +177,8 @@ class TestBuilder(object):
self
.
handle_directory
(
path
,
filename
))
if
sys
.
platform
not
in
[
'win32'
]
and
sys
.
version_info
[
0
]
<
3
:
# Non-Windows makefile, can't run Cython under Py3.
if
[
1
for
selector
in
self
.
selectors
if
selector
(
"embedded"
)]:
if
[
1
for
selector
in
self
.
selectors
if
selector
(
"embedded"
)]
\
and
not
[
1
for
selector
in
self
.
exclude_selectors
if
selector
(
"embedded"
)]:
suite
.
addTest
(
unittest
.
makeSuite
(
EmbedTest
))
return
suite
...
...
@@ -194,7 +195,7 @@ class TestBuilder(object):
if
context
==
"build"
and
filename
.
endswith
(
".srctree"
):
if
not
[
1
for
match
in
self
.
selectors
if
match
(
filename
)
]:
continue
suite
.
addTest
(
EndToEndTest
(
filename
,
workdir
,
self
.
cleanup_workdir
))
suite
.
addTest
(
EndToEndTest
(
os
.
path
.
join
(
path
,
filename
)
,
workdir
,
self
.
cleanup_workdir
))
continue
if
not
(
filename
.
endswith
(
".pyx"
)
or
filename
.
endswith
(
".py"
)):
continue
...
...
@@ -786,8 +787,9 @@ class EndToEndTest(unittest.TestCase):
cython_root
=
os
.
path
.
dirname
(
os
.
path
.
abspath
(
__file__
))
def
__init__
(
self
,
treefile
,
workdir
,
cleanup_workdir
=
True
):
self
.
name
=
os
.
path
.
splitext
(
os
.
path
.
basename
(
treefile
))[
0
]
self
.
treefile
=
treefile
self
.
workdir
=
os
.
path
.
join
(
workdir
,
os
.
path
.
splitext
(
treefile
)[
0
]
)
self
.
workdir
=
os
.
path
.
join
(
workdir
,
self
.
name
)
self
.
cleanup_workdir
=
cleanup_workdir
cython_syspath
=
self
.
cython_root
for
path
in
sys
.
path
[::
-
1
]:
...
...
@@ -800,12 +802,11 @@ class EndToEndTest(unittest.TestCase):
unittest
.
TestCase
.
__init__
(
self
)
def
shortDescription
(
self
):
return
"End-to-end %s"
%
self
.
treefil
e
return
"End-to-end %s"
%
self
.
nam
e
def
setUp
(
self
):
from
Cython.TestUtils
import
unpack_source_tree
_
,
self
.
commands
=
unpack_source_tree
(
os
.
path
.
join
(
'tests'
,
'build'
,
self
.
treefile
),
self
.
workdir
)
_
,
self
.
commands
=
unpack_source_tree
(
self
.
treefile
,
self
.
workdir
)
self
.
old_dir
=
os
.
getcwd
()
os
.
chdir
(
self
.
workdir
)
if
self
.
workdir
not
in
sys
.
path
:
...
...
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