Skip to content

Commit

Permalink
Fix singledispatch for asyncio on py26.
Browse files Browse the repository at this point in the history
Disable singledispatch tests for twisted on py26 because it doesn't
work.
  • Loading branch information
bdarnell committed Oct 18, 2015
1 parent 7b3e31b commit 3546700
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 0 deletions.
3 changes: 3 additions & 0 deletions setup.py
Expand Up @@ -122,6 +122,9 @@ def build_extension(self, ext):
if setuptools is not None:
# If setuptools is not available, you're on your own for dependencies.
install_requires = []
if sys.version_info < (2, 7):
# Only needed indirectly, for singledispatch.
install_requires.append('ordereddict')
if sys.version_info < (3, 2):
install_requires.append('backports.ssl_match_hostname')
if sys.version_info < (3, 4):
Expand Down
5 changes: 5 additions & 0 deletions tornado/test/twisted_test.py
Expand Up @@ -72,6 +72,9 @@
skipIfNoTwisted = unittest.skipUnless(have_twisted,
"twisted module not present")

skipIfPy26 = unittest.skipIf(sys.version_info < (2, 7),
"twisted incompatible with singledispatch in py26")


def save_signal_handlers():
saved = {}
Expand Down Expand Up @@ -492,6 +495,7 @@ def testTornadoServerTwistedClientReactor(self):
'http://127.0.0.1:%d' % self.tornado_port, self.run_reactor)
self.assertEqual(response, 'Hello from tornado!')

@skipIfPy26
def testTornadoServerTwistedCoroutineClientIOLoop(self):
self.start_tornado_server()
response = self.twisted_coroutine_fetch(
Expand All @@ -500,6 +504,7 @@ def testTornadoServerTwistedCoroutineClientIOLoop(self):


@skipIfNoTwisted
@skipIfPy26
class ConvertDeferredTest(unittest.TestCase):
def test_success(self):
@inlineCallbacks
Expand Down

0 comments on commit 3546700

Please sign in to comment.