bpo-40443: Remove unused imports in tests (GH-19805)

This commit is contained in:
Victor Stinner 2020-04-30 01:48:37 +02:00 committed by GitHub
parent 69e802ed81
commit 57572b103e
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
17 changed files with 4 additions and 20 deletions

View File

@ -8,7 +8,6 @@ import pickle
import unittest import unittest
import operator import operator
import struct import struct
import sys
from test import support from test import support
from test.support.script_helper import assert_python_failure from test.support.script_helper import assert_python_failure
from test.support.script_helper import assert_python_ok from test.support.script_helper import assert_python_ok

View File

@ -1,9 +1,6 @@
import ast import ast
import os
import sys
import _peg_parser as peg_parser import _peg_parser as peg_parser
import unittest import unittest
from pathlib import PurePath
from typing import Any, Union, Iterable, Tuple from typing import Any, Union, Iterable, Tuple
from textwrap import dedent from textwrap import dedent
from test import support from test import support

View File

@ -3,7 +3,6 @@ import platform
import subprocess import subprocess
import sys import sys
import unittest import unittest
import collections
from unittest import mock from unittest import mock
from test import support from test import support

View File

@ -3,7 +3,6 @@
import dis import dis
import pickle import pickle
import unittest import unittest
import sys
from test.support import check_syntax_error, use_old_parser from test.support import check_syntax_error, use_old_parser

View File

@ -5,7 +5,6 @@ from io import StringIO
from pstats import SortKey from pstats import SortKey
import pstats import pstats
import time
import cProfile import cProfile
class AddCallersTestCase(unittest.TestCase): class AddCallersTestCase(unittest.TestCase):

View File

@ -2217,7 +2217,7 @@ class ExternalTests(unittest.TestCase):
def test_re_tests(self): def test_re_tests(self):
're_tests test suite' 're_tests test suite'
from test.re_tests import tests, SUCCEED, FAIL, SYNTAX_ERROR from test.re_tests import tests, FAIL, SYNTAX_ERROR
for t in tests: for t in tests:
pattern = s = outcome = repl = expected = None pattern = s = outcome = repl = expected = None
if len(t) == 5: if len(t) == 5:

View File

@ -5,7 +5,6 @@ Note: test_regrtest cannot be run twice in parallel.
""" """
import contextlib import contextlib
import faulthandler
import glob import glob
import io import io
import os.path import os.path

View File

@ -33,7 +33,7 @@ import shutil
import tempfile import tempfile
import unittest import unittest
import warnings import warnings
from test.support import check_syntax_warning, use_old_parser from test.support import use_old_parser
TEMPLATE = r"""# coding: %s TEMPLATE = r"""# coding: %s

View File

@ -1,4 +1,3 @@
import contextlib
import errno import errno
import importlib import importlib
import io import io

View File

@ -644,7 +644,6 @@ Corner-cases that used to crash:
""" """
import re import re
import sys
import unittest import unittest
from test import support from test import support

View File

@ -4,7 +4,6 @@ import errno
import io import io
import os import os
import pathlib import pathlib
import signal
import sys import sys
import re import re
import warnings import warnings

View File

@ -1,4 +1,3 @@
import itertools
import textwrap import textwrap
import unittest import unittest
import sys import sys

View File

@ -1,7 +1,6 @@
"""Tests for the lll script in the Tools/script directory.""" """Tests for the lll script in the Tools/script directory."""
import os import os
import sys
import tempfile import tempfile
from test import support from test import support
from test.test_tools import skip_if_missing, import_tool from test.test_tools import skip_if_missing, import_tool

View File

@ -3,7 +3,7 @@ import subprocess
import sys import sys
import unittest import unittest
from test import support from test import support
from test.test_tools import import_tool, scriptsdir, skip_if_missing from test.test_tools import scriptsdir, skip_if_missing
# need Tools/script/ directory: skip if run on Python installed on the system # need Tools/script/ directory: skip if run on Python installed on the system

View File

@ -3,7 +3,7 @@ import collections
import pickle import pickle
import re import re
import sys import sys
from unittest import TestCase, main, skipUnless, SkipTest, skip from unittest import TestCase, main, skipUnless, skip
from copy import copy, deepcopy from copy import copy, deepcopy
from typing import Any, NoReturn from typing import Any, NoReturn

View File

@ -6,7 +6,6 @@ import pathlib
import random import random
import tokenize import tokenize
import ast import ast
import sys
def read_pyfile(filename): def read_pyfile(filename):

View File

@ -6,8 +6,6 @@ import copy
import io import io
import os import os
import pickle import pickle
import shutil
import subprocess
import sys import sys
import weakref import weakref
from unittest import mock from unittest import mock