From c7f44aa99aea074398b35d02afba65b49df36813 Mon Sep 17 00:00:00 2001 From: Serhiy Storchaka Date: Sun, 24 Apr 2016 13:25:01 +0300 Subject: Issue #23277: Remove more unused sys and os imports. --- Lib/distutils/tests/test_clean.py | 1 - Lib/distutils/tests/test_config.py | 1 - Lib/distutils/tests/test_install_data.py | 1 - Lib/distutils/tests/test_install_headers.py | 1 - Lib/distutils/tests/test_unixccompiler.py | 1 - Lib/lib2to3/tests/test_parser.py | 1 - Lib/lib2to3/tests/test_pytree.py | 1 - Lib/lib2to3/tests/test_util.py | 3 --- Lib/test/seq_tests.py | 1 - Lib/test/test_importlib/source/test_source_encoding.py | 1 - Lib/test/test_itertools.py | 1 - Lib/test/test_set.py | 1 - Lib/test/test_xmlrpc.py | 1 - 13 files changed, 15 deletions(-) diff --git a/Lib/distutils/tests/test_clean.py b/Lib/distutils/tests/test_clean.py index b64f300..df88ec1 100644 --- a/Lib/distutils/tests/test_clean.py +++ b/Lib/distutils/tests/test_clean.py @@ -1,5 +1,4 @@ """Tests for distutils.command.clean.""" -import sys import os import unittest import getpass diff --git a/Lib/distutils/tests/test_config.py b/Lib/distutils/tests/test_config.py index 4de825a..0929f8a 100644 --- a/Lib/distutils/tests/test_config.py +++ b/Lib/distutils/tests/test_config.py @@ -1,5 +1,4 @@ """Tests for distutils.pypirc.pypirc.""" -import sys import os import unittest import tempfile diff --git a/Lib/distutils/tests/test_install_data.py b/Lib/distutils/tests/test_install_data.py index 4d8c00a..d73624d 100644 --- a/Lib/distutils/tests/test_install_data.py +++ b/Lib/distutils/tests/test_install_data.py @@ -1,5 +1,4 @@ """Tests for distutils.command.install_data.""" -import sys import os import unittest import getpass diff --git a/Lib/distutils/tests/test_install_headers.py b/Lib/distutils/tests/test_install_headers.py index d953157..d9ed6b7 100644 --- a/Lib/distutils/tests/test_install_headers.py +++ b/Lib/distutils/tests/test_install_headers.py @@ -1,5 +1,4 @@ """Tests for distutils.command.install_headers.""" -import sys import os import unittest import getpass diff --git a/Lib/distutils/tests/test_unixccompiler.py b/Lib/distutils/tests/test_unixccompiler.py index 3d14e12..7c95be5 100644 --- a/Lib/distutils/tests/test_unixccompiler.py +++ b/Lib/distutils/tests/test_unixccompiler.py @@ -1,5 +1,4 @@ """Tests for distutils.unixccompiler.""" -import os import sys import unittest from test.support import EnvironmentVarGuard, run_unittest diff --git a/Lib/lib2to3/tests/test_parser.py b/Lib/lib2to3/tests/test_parser.py index b533c01..46c8c54 100644 --- a/Lib/lib2to3/tests/test_parser.py +++ b/Lib/lib2to3/tests/test_parser.py @@ -15,7 +15,6 @@ 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 4d585a8..c93aa65 100644 --- a/Lib/lib2to3/tests/test_pytree.py +++ b/Lib/lib2to3/tests/test_pytree.py @@ -11,7 +11,6 @@ especially when debugging a test. from __future__ import with_statement -import sys import warnings # Testing imports diff --git a/Lib/lib2to3/tests/test_util.py b/Lib/lib2to3/tests/test_util.py index d2be82c..c6c6139 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 diff --git a/Lib/test/seq_tests.py b/Lib/test/seq_tests.py index 72f4845..1e7a6f6 100644 --- a/Lib/test/seq_tests.py +++ b/Lib/test/seq_tests.py @@ -318,7 +318,6 @@ class CommonTest(unittest.TestCase): self.assertEqual(id(s), id(s*1)) def test_bigrepeat(self): - import sys if sys.maxsize <= 2147483647: x = self.type2test([0]) x *= 2**16 diff --git a/Lib/test/test_importlib/source/test_source_encoding.py b/Lib/test/test_importlib/source/test_source_encoding.py index 1e0771b..980855f 100644 --- a/Lib/test/test_importlib/source/test_source_encoding.py +++ b/Lib/test/test_importlib/source/test_source_encoding.py @@ -5,7 +5,6 @@ machinery = util.import_importlib('importlib.machinery') import codecs import importlib.util import re -import sys import types # Because sys.path gets essentially blanked, need to have unicodedata already # imported for the parser to use. diff --git a/Lib/test/test_itertools.py b/Lib/test/test_itertools.py index 5088b54..3bbfdf1 100644 --- a/Lib/test/test_itertools.py +++ b/Lib/test/test_itertools.py @@ -4,7 +4,6 @@ from itertools import * import weakref from decimal import Decimal from fractions import Fraction -import sys import operator import random import copy diff --git a/Lib/test/test_set.py b/Lib/test/test_set.py index 15ae42c..e584252 100644 --- a/Lib/test/test_set.py +++ b/Lib/test/test_set.py @@ -6,7 +6,6 @@ import operator import copy import pickle from random import randrange, shuffle -import sys import warnings import collections import collections.abc diff --git a/Lib/test/test_xmlrpc.py b/Lib/test/test_xmlrpc.py index 831a5a5..cfb5964 100644 --- a/Lib/test/test_xmlrpc.py +++ b/Lib/test/test_xmlrpc.py @@ -9,7 +9,6 @@ import xmlrpc.server import http.client import http, http.server import socket -import os import re import io import contextlib -- cgit v0.12