diff --git a/psutil/tests/test_aix.py b/psutil/tests/test_aix.py index 6a5debfa2d..4a23b774ac 100755 --- a/psutil/tests/test_aix.py +++ b/psutil/tests/test_aix.py @@ -9,12 +9,12 @@ """AIX specific tests.""" import re +import unittest import psutil from psutil import AIX from psutil.tests import PsutilTestCase from psutil.tests import sh -from psutil.tests import unittest @unittest.skipIf(not AIX, "AIX only") diff --git a/psutil/tests/test_bsd.py b/psutil/tests/test_bsd.py index 1ae810f179..a236810dfc 100755 --- a/psutil/tests/test_bsd.py +++ b/psutil/tests/test_bsd.py @@ -14,6 +14,7 @@ import os import re import time +import unittest import psutil from psutil import BSD @@ -27,7 +28,6 @@ from psutil.tests import sh from psutil.tests import spawn_testproc from psutil.tests import terminate -from psutil.tests import unittest from psutil.tests import which diff --git a/psutil/tests/test_connections.py b/psutil/tests/test_connections.py index 5381608a9b..f3b1f837ce 100755 --- a/psutil/tests/test_connections.py +++ b/psutil/tests/test_connections.py @@ -9,6 +9,7 @@ import os import socket import textwrap +import unittest from contextlib import closing from socket import AF_INET from socket import AF_INET6 @@ -39,7 +40,6 @@ from psutil.tests import serialrun from psutil.tests import skip_on_access_denied from psutil.tests import tcp_socketpair -from psutil.tests import unittest from psutil.tests import unix_socketpair from psutil.tests import wait_for_file diff --git a/psutil/tests/test_contracts.py b/psutil/tests/test_contracts.py index 9def408a90..5c927d68da 100755 --- a/psutil/tests/test_contracts.py +++ b/psutil/tests/test_contracts.py @@ -17,6 +17,7 @@ import sys import time import traceback +import unittest import psutil from psutil import AIX @@ -51,7 +52,6 @@ from psutil.tests import kernel_version from psutil.tests import process_namespace from psutil.tests import serialrun -from psutil.tests import unittest # =================================================================== diff --git a/psutil/tests/test_linux.py b/psutil/tests/test_linux.py index 0d42d0515c..8dd4caaeaf 100755 --- a/psutil/tests/test_linux.py +++ b/psutil/tests/test_linux.py @@ -20,6 +20,7 @@ import struct import textwrap import time +import unittest import warnings import psutil @@ -46,7 +47,6 @@ from psutil.tests import safe_rmpath from psutil.tests import sh from psutil.tests import skip_on_not_implemented -from psutil.tests import unittest from psutil.tests import which diff --git a/psutil/tests/test_memleaks.py b/psutil/tests/test_memleaks.py index d5baffa55f..e507e837c2 100755 --- a/psutil/tests/test_memleaks.py +++ b/psutil/tests/test_memleaks.py @@ -19,6 +19,7 @@ import functools import os +import unittest import psutil import psutil._common @@ -50,7 +51,6 @@ from psutil.tests import spawn_testproc from psutil.tests import system_namespace from psutil.tests import terminate -from psutil.tests import unittest cext = psutil._psplatform.cext diff --git a/psutil/tests/test_misc.py b/psutil/tests/test_misc.py index aa30cbd6c0..add9646eb6 100755 --- a/psutil/tests/test_misc.py +++ b/psutil/tests/test_misc.py @@ -17,6 +17,7 @@ import pickle import socket import stat +import unittest import psutil import psutil.tests @@ -51,7 +52,6 @@ from psutil.tests import mock from psutil.tests import reload_module from psutil.tests import sh -from psutil.tests import unittest # =================================================================== diff --git a/psutil/tests/test_osx.py b/psutil/tests/test_osx.py index 4f4b1c2906..d0f588ad6f 100755 --- a/psutil/tests/test_osx.py +++ b/psutil/tests/test_osx.py @@ -8,6 +8,7 @@ import re import time +import unittest import psutil from psutil import MACOS @@ -20,7 +21,6 @@ from psutil.tests import sh from psutil.tests import spawn_testproc from psutil.tests import terminate -from psutil.tests import unittest if POSIX: diff --git a/psutil/tests/test_posix.py b/psutil/tests/test_posix.py index edef7e7d44..ebbf7a6e88 100755 --- a/psutil/tests/test_posix.py +++ b/psutil/tests/test_posix.py @@ -13,6 +13,7 @@ import re import subprocess import time +import unittest import psutil from psutil import AIX @@ -32,7 +33,6 @@ from psutil.tests import skip_on_access_denied from psutil.tests import spawn_testproc from psutil.tests import terminate -from psutil.tests import unittest from psutil.tests import which diff --git a/psutil/tests/test_process.py b/psutil/tests/test_process.py index ef96e7971f..eb17e23939 100755 --- a/psutil/tests/test_process.py +++ b/psutil/tests/test_process.py @@ -19,6 +19,7 @@ import textwrap import time import types +import unittest import psutil from psutil import AIX @@ -62,7 +63,6 @@ from psutil.tests import sh from psutil.tests import skip_on_access_denied from psutil.tests import skip_on_not_implemented -from psutil.tests import unittest from psutil.tests import wait_for_pid diff --git a/psutil/tests/test_sunos.py b/psutil/tests/test_sunos.py index ad94f774d6..dd74a49b0a 100755 --- a/psutil/tests/test_sunos.py +++ b/psutil/tests/test_sunos.py @@ -7,12 +7,12 @@ """Sun OS specific tests.""" import os +import unittest import psutil from psutil import SUNOS from psutil.tests import PsutilTestCase from psutil.tests import sh -from psutil.tests import unittest @unittest.skipIf(not SUNOS, "SUNOS only") diff --git a/psutil/tests/test_system.py b/psutil/tests/test_system.py index bb5edd5c3c..e130c935e1 100755 --- a/psutil/tests/test_system.py +++ b/psutil/tests/test_system.py @@ -16,6 +16,7 @@ import socket import sys import time +import unittest import psutil from psutil import AIX @@ -50,7 +51,6 @@ from psutil.tests import enum from psutil.tests import mock from psutil.tests import retry_on_failure -from psutil.tests import unittest # =================================================================== diff --git a/psutil/tests/test_testutils.py b/psutil/tests/test_testutils.py index 89888dfe05..dd98538c0a 100755 --- a/psutil/tests/test_testutils.py +++ b/psutil/tests/test_testutils.py @@ -16,6 +16,7 @@ import socket import stat import subprocess +import unittest import psutil import psutil.tests @@ -48,7 +49,6 @@ from psutil.tests import system_namespace from psutil.tests import tcp_socketpair from psutil.tests import terminate -from psutil.tests import unittest from psutil.tests import unix_socketpair from psutil.tests import wait_for_file from psutil.tests import wait_for_pid diff --git a/psutil/tests/test_unicode.py b/psutil/tests/test_unicode.py index e635726943..3fa3f0172a 100755 --- a/psutil/tests/test_unicode.py +++ b/psutil/tests/test_unicode.py @@ -76,6 +76,7 @@ import os import shutil import traceback +import unittest import warnings from contextlib import closing @@ -108,7 +109,6 @@ from psutil.tests import skip_on_access_denied from psutil.tests import spawn_testproc from psutil.tests import terminate -from psutil.tests import unittest if APPVEYOR: diff --git a/psutil/tests/test_windows.py b/psutil/tests/test_windows.py index 0333dbe554..b89c67a961 100755 --- a/psutil/tests/test_windows.py +++ b/psutil/tests/test_windows.py @@ -17,6 +17,7 @@ import subprocess import sys import time +import unittest import warnings import psutil @@ -36,7 +37,6 @@ from psutil.tests import sh from psutil.tests import spawn_testproc from psutil.tests import terminate -from psutil.tests import unittest if WINDOWS and not PYPY: