Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
G
gevent
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
gevent
Commits
4c87728b
Commit
4c87728b
authored
Oct 29, 2010
by
Denis Bilenko
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
test__doctests.py: skip modules that cannot be imported
parent
ebfc95fd
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
11 additions
and
7 deletions
+11
-7
greentest/test__doctests.py
greentest/test__doctests.py
+11
-7
No files found.
greentest/test__doctests.py
View file @
4c87728b
...
...
@@ -3,7 +3,7 @@ import os
import
re
import
doctest
import
unittest
from
os.path
import
join
,
dirname
import
traceback
import
gevent
from
gevent
import
socket
from
greentest
import
walk_modules
...
...
@@ -19,7 +19,7 @@ if __name__ == '__main__':
try
:
allowed_modules
=
sys
.
argv
[
1
:]
sys
.
path
.
append
(
'.'
)
base
=
dirname
(
gevent
.
__file__
)
base
=
os
.
path
.
dirname
(
gevent
.
__file__
)
print
base
os
.
chdir
(
'..'
)
...
...
@@ -44,11 +44,15 @@ if __name__ == '__main__':
modules_count
=
0
for
m
,
path
in
modules
:
if
re
.
search
(
'^
\
s*>>>
'
, open(path).read(), re.M):
s = doctest.DocTestSuite(m, extraglobs=globs)
print '
%
s
(
from
%
s
):
%
s
tests
' % (m, path, len(s._tests))
suite.addTest(s)
modules_count += 1
tests_count += len(s._tests)
try:
s = doctest.DocTestSuite(m, extraglobs=globs)
print '
%
s
(
from
%
s
):
%
s
tests
' % (m, path, len(s._tests))
suite.addTest(s)
modules_count += 1
tests_count += len(s._tests)
except Exception:
traceback.print_exc()
sys.stderr.write('
Failed
to
process
%
s
\
n
\
n
' % path)
print '
Total
:
%
s
tests
in
%
s
modules
' % (tests_count, modules_count)
runner = unittest.TextTestRunner(verbosity=2)
runner.run(suite)
...
...
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