diff options
Diffstat (limited to 'Lib/lib2to3/tests')
-rw-r--r-- | Lib/lib2to3/tests/data/py3_test_grammar.py | 2 | ||||
-rw-r--r-- | Lib/lib2to3/tests/support.py | 2 | ||||
-rw-r--r-- | Lib/lib2to3/tests/test_all_fixers.py | 1 | ||||
-rw-r--r-- | Lib/lib2to3/tests/test_fixers.py | 7 | ||||
-rw-r--r-- | Lib/lib2to3/tests/test_parser.py | 3 | ||||
-rw-r--r-- | Lib/lib2to3/tests/test_pytree.py | 3 | ||||
-rw-r--r-- | Lib/lib2to3/tests/test_refactor.py | 4 | ||||
-rw-r--r-- | Lib/lib2to3/tests/test_util.py | 3 |
8 files changed, 7 insertions, 18 deletions
diff --git a/Lib/lib2to3/tests/data/py3_test_grammar.py b/Lib/lib2to3/tests/data/py3_test_grammar.py index c0bf7f27aa..cf31a5411a 100644 --- a/Lib/lib2to3/tests/data/py3_test_grammar.py +++ b/Lib/lib2to3/tests/data/py3_test_grammar.py @@ -319,7 +319,7 @@ class GrammarTests(unittest.TestCase): def f(x) -> list: pass self.assertEquals(f.__annotations__, {'return': list}) - # test MAKE_CLOSURE with a variety of oparg's + # test closures with a variety of oparg's closure = 1 def f(): return closure def f(x=1): return closure diff --git a/Lib/lib2to3/tests/support.py b/Lib/lib2to3/tests/support.py index 6f2d214bd4..7153bb6990 100644 --- a/Lib/lib2to3/tests/support.py +++ b/Lib/lib2to3/tests/support.py @@ -3,10 +3,8 @@ # Python imports import unittest -import sys import os import os.path -import re from textwrap import dedent # Local imports diff --git a/Lib/lib2to3/tests/test_all_fixers.py b/Lib/lib2to3/tests/test_all_fixers.py index 15079fe028..c0507cf3fb 100644 --- a/Lib/lib2to3/tests/test_all_fixers.py +++ b/Lib/lib2to3/tests/test_all_fixers.py @@ -10,7 +10,6 @@ import unittest import test.support # Local imports -from lib2to3 import refactor from . import support diff --git a/Lib/lib2to3/tests/test_fixers.py b/Lib/lib2to3/tests/test_fixers.py index 06b0033b8f..b97b73ab60 100644 --- a/Lib/lib2to3/tests/test_fixers.py +++ b/Lib/lib2to3/tests/test_fixers.py @@ -2,12 +2,11 @@ # Python imports import os -import unittest from itertools import chain from operator import itemgetter # Local imports -from lib2to3 import pygram, pytree, refactor, fixer_util +from lib2to3 import pygram, fixer_util from lib2to3.tests import support @@ -3322,6 +3321,10 @@ class Test_types(FixerTestCase): a = """type(None)""" self.check(b, a) + b = "types.StringTypes" + a = "(str,)" + self.check(b, a) + class Test_idioms(FixerTestCase): fixer = "idioms" diff --git a/Lib/lib2to3/tests/test_parser.py b/Lib/lib2to3/tests/test_parser.py index b533c01e28..36eb176e5f 100644 --- a/Lib/lib2to3/tests/test_parser.py +++ b/Lib/lib2to3/tests/test_parser.py @@ -10,12 +10,11 @@ from __future__ import with_statement # Testing imports from . import support -from .support import driver, test_dir +from .support import driver from test.support import verbose # Python imports import os -import sys import unittest import warnings import subprocess diff --git a/Lib/lib2to3/tests/test_pytree.py b/Lib/lib2to3/tests/test_pytree.py index 4d585a8841..a611d1715e 100644 --- a/Lib/lib2to3/tests/test_pytree.py +++ b/Lib/lib2to3/tests/test_pytree.py @@ -11,9 +11,6 @@ especially when debugging a test. from __future__ import with_statement -import sys -import warnings - # Testing imports from . import support diff --git a/Lib/lib2to3/tests/test_refactor.py b/Lib/lib2to3/tests/test_refactor.py index 856300153d..94dc135fac 100644 --- a/Lib/lib2to3/tests/test_refactor.py +++ b/Lib/lib2to3/tests/test_refactor.py @@ -7,19 +7,15 @@ from __future__ import with_statement import sys import os import codecs -import operator import io import re import tempfile import shutil import unittest -import warnings from lib2to3 import refactor, pygram, fixer_base from lib2to3.pgen2 import token -from . import support - TEST_DATA_DIR = os.path.join(os.path.dirname(__file__), "data") FIXER_DIR = os.path.join(TEST_DATA_DIR, "fixers") diff --git a/Lib/lib2to3/tests/test_util.py b/Lib/lib2to3/tests/test_util.py index d2be82c4a2..c6c613972d 100644 --- a/Lib/lib2to3/tests/test_util.py +++ b/Lib/lib2to3/tests/test_util.py @@ -3,9 +3,6 @@ # Testing imports from . import support -# Python imports -import os.path - # Local imports from lib2to3.pytree import Node, Leaf from lib2to3 import fixer_util |