Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
C
cpython
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
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
Kirill Smelkov
cpython
Commits
7c1017bf
Commit
7c1017bf
authored
Aug 29, 2013
by
Andrew Svetlov
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Fix tests for #11798
parent
eb973684
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
10 additions
and
4 deletions
+10
-4
Lib/doctest.py
Lib/doctest.py
+9
-3
Lib/test/test_pyclbr.py
Lib/test/test_pyclbr.py
+1
-1
No files found.
Lib/doctest.py
View file @
7c1017bf
...
...
@@ -2290,6 +2290,12 @@ class SkipDocTestCase(DocTestCase):
__str__
=
shortDescription
class
_DocTestSuite
(
unittest
.
TestSuite
):
def
_removeTestAtIndex
(
self
,
index
):
pass
def
DocTestSuite
(
module
=
None
,
globs
=
None
,
extraglobs
=
None
,
test_finder
=
None
,
**
options
):
"""
...
...
@@ -2335,7 +2341,7 @@ def DocTestSuite(module=None, globs=None, extraglobs=None, test_finder=None,
if
not
tests
and
sys
.
flags
.
optimize
>=
2
:
# Skip doctests when running with -O2
suite
=
unittest
.
TestSuite
()
suite
=
_Doc
TestSuite
()
suite
.
addTest
(
SkipDocTestCase
(
module
))
return
suite
elif
not
tests
:
...
...
@@ -2349,7 +2355,7 @@ def DocTestSuite(module=None, globs=None, extraglobs=None, test_finder=None,
raise
ValueError
(
module
,
"has no docstrings"
)
tests
.
sort
()
suite
=
unittest
.
TestSuite
()
suite
=
_Doc
TestSuite
()
for
test
in
tests
:
if
len
(
test
.
examples
)
==
0
:
...
...
@@ -2459,7 +2465,7 @@ def DocFileSuite(*paths, **kw):
encoding
An encoding that will be used to convert the files to unicode.
"""
suite
=
unittest
.
TestSuite
()
suite
=
_Doc
TestSuite
()
# We do this here so that _normalize_module is called at the right
# level. If it were called in DocFileTest, then this function
...
...
Lib/test/test_pyclbr.py
View file @
7c1017bf
...
...
@@ -142,7 +142,7 @@ class PyclbrTest(TestCase):
self
.
checkModule
(
'pyclbr'
)
self
.
checkModule
(
'ast'
)
self
.
checkModule
(
'doctest'
,
ignore
=
(
"TestResults"
,
"_SpoofOut"
,
"DocTestCase"
))
"DocTestCase"
,
'_DocTestSuite'
))
self
.
checkModule
(
'difflib'
,
ignore
=
(
"Match"
,))
def
test_decorators
(
self
):
...
...
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