Add missing import when running these tests standalone.

This commit is contained in:
Georg Brandl 2010-02-06 23:53:52 +00:00
parent cd4a21bb8e
commit 28aeb0d0ab
9 changed files with 22 additions and 11 deletions

View File

@ -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())

View File

@ -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())

View File

@ -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())

View File

@ -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())

View File

@ -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())

View File

@ -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())

View File

@ -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())

View File

@ -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())

View File

@ -2,6 +2,7 @@
import os
import test
import unittest
import shutil
from distutils import sysconfig
from distutils.tests import support