[Python-checkins] r72492 - sandbox/trunk/2to3/lib2to3/tests/support.py
benjamin.peterson
python-checkins at python.org
Sat May 9 02:35:38 CEST 2009
Author: benjamin.peterson
Date: Sat May 9 02:35:38 2009
New Revision: 72492
Log:
remove compat code
Modified:
sandbox/trunk/2to3/lib2to3/tests/support.py
Modified: sandbox/trunk/2to3/lib2to3/tests/support.py
==============================================================================
--- sandbox/trunk/2to3/lib2to3/tests/support.py (original)
+++ sandbox/trunk/2to3/lib2to3/tests/support.py Sat May 9 02:35:38 2009
@@ -9,12 +9,9 @@
import re
from textwrap import dedent
-#sys.path.insert(0, os.path.join(os.path.dirname(__file__), ".."))
-
# Local imports
-from .. import pytree
-from .. import refactor
-from ..pgen2 import driver
+from lib2to3 import pytree, refactor
+from lib2to3.pgen2 import driver
test_dir = os.path.dirname(__file__)
proj_dir = os.path.normpath(os.path.join(test_dir, ".."))
@@ -25,12 +22,6 @@
def parse_string(string):
return driver.parse_string(reformat(string), debug=True)
-# Python 2.3's TestSuite is not iter()-able
-if sys.version_info < (2, 4):
- def TestSuite_iter(self):
- return iter(self._tests)
- unittest.TestSuite.__iter__ = TestSuite_iter
-
def run_all_tests(test_mod=None, tests=None):
if tests is None:
tests = unittest.TestLoader().loadTestsFromModule(test_mod)
More information about the Python-checkins
mailing list