commit 79e29c62ce095984d0e9da5b7c5072eb9aa6e131 Author: yac Date: Sat Mar 8 00:32:09 2014 +0100 fixes #1005 diff --git a/tornado/test/util.py b/tornado/test/util.py index 3604310..e4e37f0 100644 --- a/tornado/test/util.py +++ b/tornado/test/util.py @@ -3,6 +3,10 @@ from __future__ import absolute_import, division, print_function, with_statement import os import sys +# Tornado's own test suite requires the updated unittest module +# (either py27+ or unittest2) so tornado.test.util enforces +# this requirement, but for other users of tornado.testing we want +# to allow the older version if unitest2 is not available. # Encapsulate the choice of unittest or unittest2 here. # To be used as 'from tornado.test.util import unittest'. if sys.version_info >= (2, 7): diff --git a/tornado/testing.py b/tornado/testing.py index 96fdd32..cd811d4 100644 --- a/tornado/testing.py +++ b/tornado/testing.py @@ -45,14 +45,7 @@ try: except ImportError: from io import StringIO # py3 -# Tornado's own test suite requires the updated unittest module -# (either py27+ or unittest2) so tornado.test.util enforces -# this requirement, but for other users of tornado.testing we want -# to allow the older version if unitest2 is not available. -try: - import unittest2 as unittest -except ImportError: - import unittest +from tornado.test.util import unittest _next_port = 10000