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): ...@@ -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)
......
...@@ -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,
......
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