Commit 3f41248c authored by Jason Madden's avatar Jason Madden

These doctests aren't testing what they thought they were.

parent d100efb1
......@@ -204,24 +204,25 @@ class PyThreadingLocalTest(unittest.TestCase, BaseLocalTest):
def test_main():
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(PyThreadingLocalTest))
try:
from thread import _local
except ImportError:
pass
else:
import _threading_local
local_orig = _threading_local.local
def setUp(test):
_threading_local.local = _local
def tearDown(test):
_threading_local.local = local_orig
suite.addTest(DocTestSuite('_threading_local',
setUp=setUp, tearDown=tearDown)
)
# gevent: disabled doctests. they hang on OSX on Travis.
# try:
# from thread import _local
# except ImportError:
# pass
# else:
# import _threading_local
# local_orig = _threading_local.local
# def setUp(test):
# _threading_local.local = _local
# def tearDown(test):
# _threading_local.local = local_orig
# suite.addTest(DocTestSuite('_threading_local',
# setUp=setUp, tearDown=tearDown)
# )
support.run_unittest(suite)
......
......@@ -1411,9 +1411,10 @@ class RequestTests(unittest.TestCase):
self.assertEqual(err.info(), "Content-Length:42")
def test_main(verbose=None):
from test import test_urllib2
test_support.run_doctest(test_urllib2, verbose)
test_support.run_doctest(urllib2, verbose)
# gevent: disabled doctests. they hang on OSX on Travis.
# from test import test_urllib2
# test_support.run_doctest(test_urllib2, verbose)
# test_support.run_doctest(urllib2, verbose)
tests = (TrivialTests,
OpenerDirectorTests,
HandlerTests,
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment