mirror of https://github.com/python/cpython
Add missing import when running these tests standalone.
This commit is contained in:
parent
cd4a21bb8e
commit
28aeb0d0ab
|
@ -5,6 +5,8 @@ import os
|
|||
import tempfile
|
||||
import shutil
|
||||
|
||||
from test.test_support import run_unittest
|
||||
|
||||
from distutils.core import Distribution
|
||||
from distutils.command.bdist import bdist
|
||||
from distutils.tests import support
|
||||
|
@ -40,4 +42,4 @@ def test_suite():
|
|||
return unittest.makeSuite(BuildTestCase)
|
||||
|
||||
if __name__ == '__main__':
|
||||
test_support.run_unittest(test_suite())
|
||||
run_unittest(test_suite())
|
||||
|
|
|
@ -11,6 +11,8 @@ try:
|
|||
except ImportError:
|
||||
zlib = None
|
||||
|
||||
from test.test_support import run_unittest
|
||||
|
||||
from distutils.core import Distribution
|
||||
from distutils.command.bdist_dumb import bdist_dumb
|
||||
from distutils.tests import support
|
||||
|
@ -100,4 +102,4 @@ def test_suite():
|
|||
return unittest.makeSuite(BuildDumbTestCase)
|
||||
|
||||
if __name__ == '__main__':
|
||||
test_support.run_unittest(test_suite())
|
||||
run_unittest(test_suite())
|
||||
|
|
|
@ -2,6 +2,8 @@
|
|||
import unittest
|
||||
import sys
|
||||
|
||||
from test.test_support import run_unittest
|
||||
|
||||
from distutils.tests import support
|
||||
|
||||
@unittest.skipUnless(sys.platform=="win32", "These tests are only for win32")
|
||||
|
@ -20,4 +22,4 @@ def test_suite():
|
|||
return unittest.makeSuite(BDistMSITestCase)
|
||||
|
||||
if __name__ == '__main__':
|
||||
test_support.run_unittest(test_suite())
|
||||
run_unittest(test_suite())
|
||||
|
|
|
@ -6,6 +6,8 @@ import os
|
|||
import tempfile
|
||||
import shutil
|
||||
|
||||
from test.test_support import run_unittest
|
||||
|
||||
from distutils.core import Distribution
|
||||
from distutils.command.bdist_rpm import bdist_rpm
|
||||
from distutils.tests import support
|
||||
|
@ -122,4 +124,4 @@ def test_suite():
|
|||
return unittest.makeSuite(BuildRpmTestCase)
|
||||
|
||||
if __name__ == '__main__':
|
||||
test_support.run_unittest(test_suite())
|
||||
run_unittest(test_suite())
|
||||
|
|
|
@ -1,6 +1,8 @@
|
|||
"""Tests for distutils.command.bdist_wininst."""
|
||||
import unittest
|
||||
|
||||
from test.test_support import run_unittest
|
||||
|
||||
from distutils.command.bdist_wininst import bdist_wininst
|
||||
from distutils.tests import support
|
||||
|
||||
|
@ -27,4 +29,4 @@ def test_suite():
|
|||
return unittest.makeSuite(BuildWinInstTestCase)
|
||||
|
||||
if __name__ == '__main__':
|
||||
test_support.run_unittest(test_suite())
|
||||
run_unittest(test_suite())
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
"""Tests for distutils.cmd."""
|
||||
import unittest
|
||||
import os
|
||||
from test.test_support import captured_stdout
|
||||
from test.test_support import captured_stdout, run_unittest
|
||||
|
||||
from distutils.cmd import Command
|
||||
from distutils.dist import Distribution
|
||||
|
@ -124,4 +124,4 @@ def test_suite():
|
|||
return unittest.makeSuite(CommandTestCase)
|
||||
|
||||
if __name__ == '__main__':
|
||||
test_support.run_unittest(test_suite())
|
||||
run_unittest(test_suite())
|
||||
|
|
|
@ -5,7 +5,7 @@ import os
|
|||
import warnings
|
||||
import sysconfig
|
||||
|
||||
from test.test_support import check_warnings
|
||||
from test.test_support import check_warnings, run_unittest
|
||||
from test.test_support import captured_stdout
|
||||
|
||||
from distutils import cygwinccompiler
|
||||
|
@ -108,4 +108,4 @@ def test_suite():
|
|||
return unittest.makeSuite(CygwinCCompilerTestCase)
|
||||
|
||||
if __name__ == '__main__':
|
||||
test_support.run_unittest(test_suite())
|
||||
run_unittest(test_suite())
|
||||
|
|
|
@ -4,7 +4,7 @@ import sys
|
|||
import os
|
||||
import warnings
|
||||
|
||||
from test.test_support import check_warnings
|
||||
from test.test_support import check_warnings, run_unittest
|
||||
from test.test_support import captured_stdout
|
||||
|
||||
from distutils.emxccompiler import get_versions
|
||||
|
@ -30,4 +30,4 @@ def test_suite():
|
|||
return unittest.makeSuite(EmxCCompilerTestCase)
|
||||
|
||||
if __name__ == '__main__':
|
||||
test_support.run_unittest(test_suite())
|
||||
run_unittest(test_suite())
|
||||
|
|
|
@ -2,6 +2,7 @@
|
|||
import os
|
||||
import test
|
||||
import unittest
|
||||
import shutil
|
||||
|
||||
from distutils import sysconfig
|
||||
from distutils.tests import support
|
||||
|
|
Loading…
Reference in New Issue