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
3f41248c
Commit
3f41248c
authored
Apr 18, 2020
by
Jason Madden
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
These doctests aren't testing what they thought they were.
parent
d100efb1
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
21 additions
and
19 deletions
+21
-19
src/greentest/2.7/test_threading_local.py
src/greentest/2.7/test_threading_local.py
+17
-16
src/greentest/2.7/test_urllib2.py
src/greentest/2.7/test_urllib2.py
+4
-3
No files found.
src/greentest/2.7/test_threading_local.py
View file @
3f41248c
...
@@ -204,24 +204,25 @@ class PyThreadingLocalTest(unittest.TestCase, BaseLocalTest):
...
@@ -204,24 +204,25 @@ class PyThreadingLocalTest(unittest.TestCase, BaseLocalTest):
def
test_main
():
def
test_main
():
suite
=
unittest
.
TestSuite
()
suite
=
unittest
.
TestSuite
()
suite
.
addTest
(
DocTestSuite
(
'_threading_local'
))
# gevent: disabled doctests. they hang on OSX on Travis.
# suite.addTest(DocTestSuite('_threading_local'))
suite
.
addTest
(
unittest
.
makeSuite
(
ThreadLocalTest
))
suite
.
addTest
(
unittest
.
makeSuite
(
ThreadLocalTest
))
suite
.
addTest
(
unittest
.
makeSuite
(
PyThreadingLocalTest
))
suite
.
addTest
(
unittest
.
makeSuite
(
PyThreadingLocalTest
))
# gevent: disabled doctests. they hang on OSX on Travis.
try
:
#
try:
from
thread
import
_local
#
from thread import _local
except
ImportError
:
#
except ImportError:
pass
#
pass
else
:
#
else:
import
_threading_local
#
import _threading_local
local_orig
=
_threading_local
.
local
#
local_orig = _threading_local.local
def
setUp
(
test
):
#
def setUp(test):
_threading_local
.
local
=
_local
#
_threading_local.local = _local
def
tearDown
(
test
):
#
def tearDown(test):
_threading_local
.
local
=
local_orig
#
_threading_local.local = local_orig
suite
.
addTest
(
DocTestSuite
(
'_threading_local'
,
#
suite.addTest(DocTestSuite('_threading_local',
setUp
=
setUp
,
tearDown
=
tearDown
)
#
setUp=setUp, tearDown=tearDown)
)
#
)
support
.
run_unittest
(
suite
)
support
.
run_unittest
(
suite
)
...
...
src/greentest/2.7/test_urllib2.py
View file @
3f41248c
...
@@ -1411,9 +1411,10 @@ class RequestTests(unittest.TestCase):
...
@@ -1411,9 +1411,10 @@ class RequestTests(unittest.TestCase):
self
.
assertEqual
(
err
.
info
(),
"Content-Length:42"
)
self
.
assertEqual
(
err
.
info
(),
"Content-Length:42"
)
def
test_main
(
verbose
=
None
):
def
test_main
(
verbose
=
None
):
from
test
import
test_urllib2
# gevent: disabled doctests. they hang on OSX on Travis.
test_support
.
run_doctest
(
test_urllib2
,
verbose
)
# from test import test_urllib2
test_support
.
run_doctest
(
urllib2
,
verbose
)
# test_support.run_doctest(test_urllib2, verbose)
# test_support.run_doctest(urllib2, verbose)
tests
=
(
TrivialTests
,
tests
=
(
TrivialTests
,
OpenerDirectorTests
,
OpenerDirectorTests
,
HandlerTests
,
HandlerTests
,
...
...
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