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
Gwenaël Samain
cython
Commits
c0fdd369
Commit
c0fdd369
authored
Apr 16, 2009
by
Robert Bradshaw
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Use bugs list instead of bugs directory.
parent
96928c33
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
17 additions
and
4 deletions
+17
-4
runtests.py
runtests.py
+17
-4
No files found.
runtests.py
View file @
c0fdd369
...
@@ -10,7 +10,7 @@ from distutils.command.build_ext import build_ext as _build_ext
...
@@ -10,7 +10,7 @@ from distutils.command.build_ext import build_ext as _build_ext
distutils_distro
=
Distribution
()
distutils_distro
=
Distribution
()
TEST_DIRS
=
[
'compile'
,
'errors'
,
'run'
,
'pyregr'
]
TEST_DIRS
=
[
'compile'
,
'errors'
,
'run'
,
'pyregr'
]
TEST_RUN_DIRS
=
[
'run'
,
'pyregr'
,
'bugs'
]
TEST_RUN_DIRS
=
[
'run'
,
'pyregr'
]
# Lists external modules, and a matcher matching tests
# Lists external modules, and a matcher matching tests
# which should be excluded if the module is not present.
# which should be excluded if the module is not present.
...
@@ -91,8 +91,6 @@ class TestBuilder(object):
...
@@ -91,8 +91,6 @@ class TestBuilder(object):
def
build_suite
(
self
):
def
build_suite
(
self
):
suite
=
unittest
.
TestSuite
()
suite
=
unittest
.
TestSuite
()
test_dirs
=
TEST_DIRS
test_dirs
=
TEST_DIRS
if
self
.
test_bugs
and
'bugs'
not
in
test_dirs
:
test_dirs
.
append
(
'bugs'
)
filenames
=
os
.
listdir
(
self
.
rootdir
)
filenames
=
os
.
listdir
(
self
.
rootdir
)
filenames
.
sort
()
filenames
.
sort
()
for
filename
in
filenames
:
for
filename
in
filenames
:
...
@@ -466,6 +464,18 @@ class VersionDependencyExcluder:
...
@@ -466,6 +464,18 @@ class VersionDependencyExcluder:
return
True
return
True
return
False
return
False
class
FileListExcluder
:
def
__init__
(
self
,
list_file
):
self
.
excludes
=
{}
for
line
in
open
(
list_file
).
readlines
():
line
=
line
.
strip
()
if
line
and
line
[
0
]
!=
'#'
:
self
.
excludes
[
line
.
split
()[
0
]]
=
True
def
__call__
(
self
,
testname
):
return
testname
.
split
(
'.'
)[
-
1
]
in
self
.
excludes
if
__name__
==
'__main__'
:
if
__name__
==
'__main__'
:
from
optparse
import
OptionParser
from
optparse
import
OptionParser
parser
=
OptionParser
()
parser
=
OptionParser
()
...
@@ -583,7 +593,7 @@ if __name__ == '__main__':
...
@@ -583,7 +593,7 @@ if __name__ == '__main__':
if
options
.
tickets
:
if
options
.
tickets
:
for
ticket_number
in
options
.
tickets
:
for
ticket_number
in
options
.
tickets
:
test_bugs
=
True
test_bugs
=
True
cmd_args
.
append
(
'
bugs
.*T%s$'
%
ticket_number
)
cmd_args
.
append
(
'.*T%s$'
%
ticket_number
)
if
not
test_bugs
:
if
not
test_bugs
:
for
selector
in
cmd_args
:
for
selector
in
cmd_args
:
if
selector
.
startswith
(
'bugs'
):
if
selector
.
startswith
(
'bugs'
):
...
@@ -604,6 +614,9 @@ if __name__ == '__main__':
...
@@ -604,6 +614,9 @@ if __name__ == '__main__':
if
options
.
exclude
:
if
options
.
exclude
:
exclude_selectors
+=
[
re
.
compile
(
r
,
re
.
I
|
re
.
U
).
search
for
r
in
options
.
exclude
]
exclude_selectors
+=
[
re
.
compile
(
r
,
re
.
I
|
re
.
U
).
search
for
r
in
options
.
exclude
]
if
not
test_bugs
:
exclude_selectors
+=
[
FileListExcluder
(
"tests/bugs.txt"
)
]
languages
=
[]
languages
=
[]
if
options
.
use_c
:
if
options
.
use_c
:
languages
.
append
(
'c'
)
languages
.
append
(
'c'
)
...
...
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