Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Z
ZEO
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
Kirill Smelkov
ZEO
Commits
f932aed2
Commit
f932aed2
authored
May 17, 2013
by
Tres Seaver
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Skip layer-based tests inside 'setup.py test'.
parent
58b8436e
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
18 additions
and
1 deletion
+18
-1
setup.py
setup.py
+18
-1
No files found.
setup.py
View file @
f932aed2
...
...
@@ -45,6 +45,23 @@ def _modname(path, base, name=''):
dirname
,
basename
=
os
.
path
.
split
(
path
)
return
_modname
(
dirname
,
base
,
basename
+
'.'
+
name
)
def
_flatten
(
suite
,
predicate
=
lambda
*
x
:
True
):
from
unittest
import
TestCase
for
suite_or_case
in
suite
:
if
predicate
(
suite_or_case
):
if
isinstance
(
suite_or_case
,
TestCase
):
yield
suite_or_case
else
:
for
x
in
_flatten
(
suite_or_case
):
yield
x
def
_no_layer
(
suite_or_case
):
return
getattr
(
suite_or_case
,
'layer'
,
None
)
is
None
def
_unittests_only
(
suite
,
mod_suite
):
for
case
in
_flatten
(
mod_suite
,
_no_layer
):
suite
.
addTest
(
case
)
def
alltests
():
import
logging
import
pkg_resources
...
...
@@ -70,7 +87,7 @@ def alltests():
mod
=
__import__
(
_modname
(
dirpath
,
base
,
os
.
path
.
splitext
(
filename
)[
0
]),
{},
{},
[
'*'
])
suite
.
addTest
(
mod
.
test_suite
())
_unittests_only
(
suite
,
mod
.
test_suite
())
return
suite
tests_require
=
[
'zope.testing'
,
'manuel'
,
'random2'
]
...
...
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