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
32ea1429
Commit
32ea1429
authored
Apr 12, 2011
by
Robert Bradshaw
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Use tags for test deps.
parent
6a6eeb49
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
7 additions
and
9 deletions
+7
-9
runtests.py
runtests.py
+7
-9
No files found.
runtests.py
View file @
32ea1429
...
...
@@ -68,25 +68,23 @@ if sys.platform == 'win32':
except
ValueError
:
pass
distutils_distro
.
parse_config_files
(
cfgfiles
)
# Lists external modules, and a matcher matching tests
# which should be excluded if the module is not present.
# TODO: use tags for these
EXT_DEP_MODULES
=
{
'numpy'
:
re
.
compile
(
'.*
\
.
n
umpy_.*'
).
match
,
'pstats'
:
re
.
compile
(
'.*
\
.ps
t
ats_.*'
).
match
,
'posix'
:
re
.
compile
(
'.*
\
.posix_.*
'
).match
,
'numpy'
:
'tag:numpy'
,
'pstats'
:
'tag:pstats'
,
'posix'
:
'tag:posix'
,
}
def
get_numpy_include_dirs
():
import
numpy
return
[
numpy
.
get_include
()]
# TODO: use tags
EXT_DEP_INCLUDES
=
[
# test name matcher , callable returning list
(
re
.
compile
(
'numpy_.*'
).
match
,
get_numpy_include_dirs
),
]
# TODO: use tags
VER_DEP_MODULES
=
{
# tests are excluded if 'CurrentPythonVersion OP VersionTuple', i.e.
# (2,4) : (operator.lt, ...) excludes ... when PyVer < 2.4.x
...
...
@@ -971,11 +969,11 @@ class MissingDependencyExcluder:
try
:
__import__
(
mod
)
except
ImportError
:
self
.
exclude_matchers
.
append
(
matcher
)
self
.
exclude_matchers
.
append
(
string_selector
(
matcher
)
)
self
.
tests_missing_deps
=
[]
def
__call__
(
self
,
testname
,
tags
=
None
):
for
matcher
in
self
.
exclude_matchers
:
if
matcher
(
testname
):
if
matcher
(
testname
,
tags
):
self
.
tests_missing_deps
.
append
(
testname
)
return
True
return
False
...
...
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