[Python-checkins] r70620 - in python/trunk/Lib/test: test__locale.py test_commands.py test_curses.py test_decimal.py test_dl.py test_fork1.py test_gl.py test_ioctl.py test_largefile.py test_linuxaudiodev.py test_locale.py test_mhlib.py test_minidom.py test_multiprocessing.py test_openpty.py test_ossaudiodev.py test_pipes.py test_poll.py test_popen2.py test_pty.py test_py3kwarn.py test_site.py test_socketserver.py test_sqlite.py test_sunaudiodev.py test_support.py test_threaded_import.py test_threadsignals.py test_unicode_file.py test_wait3.py test_wait4.py

benjamin.peterson python-checkins at python.org
Thu Mar 26 22:10:31 CET 2009


Author: benjamin.peterson
Date: Thu Mar 26 22:10:30 2009
New Revision: 70620

Log:
fix incorrect auto-translation of TestSkipped -> unittest.SkipTest

Modified:
   python/trunk/Lib/test/test__locale.py
   python/trunk/Lib/test/test_commands.py
   python/trunk/Lib/test/test_curses.py
   python/trunk/Lib/test/test_decimal.py
   python/trunk/Lib/test/test_dl.py
   python/trunk/Lib/test/test_fork1.py
   python/trunk/Lib/test/test_gl.py
   python/trunk/Lib/test/test_ioctl.py
   python/trunk/Lib/test/test_largefile.py
   python/trunk/Lib/test/test_linuxaudiodev.py
   python/trunk/Lib/test/test_locale.py
   python/trunk/Lib/test/test_mhlib.py
   python/trunk/Lib/test/test_minidom.py
   python/trunk/Lib/test/test_multiprocessing.py
   python/trunk/Lib/test/test_openpty.py
   python/trunk/Lib/test/test_ossaudiodev.py
   python/trunk/Lib/test/test_pipes.py
   python/trunk/Lib/test/test_poll.py
   python/trunk/Lib/test/test_popen2.py
   python/trunk/Lib/test/test_pty.py
   python/trunk/Lib/test/test_py3kwarn.py
   python/trunk/Lib/test/test_site.py
   python/trunk/Lib/test/test_socketserver.py
   python/trunk/Lib/test/test_sqlite.py
   python/trunk/Lib/test/test_sunaudiodev.py
   python/trunk/Lib/test/test_support.py
   python/trunk/Lib/test/test_threaded_import.py
   python/trunk/Lib/test/test_threadsignals.py
   python/trunk/Lib/test/test_unicode_file.py
   python/trunk/Lib/test/test_wait3.py
   python/trunk/Lib/test/test_wait4.py

Modified: python/trunk/Lib/test/test__locale.py
==============================================================================
--- python/trunk/Lib/test/test__locale.py	(original)
+++ python/trunk/Lib/test/test__locale.py	Thu Mar 26 22:10:30 2009
@@ -1,4 +1,4 @@
-from test.test_support import verbose, SkipTest, run_unittest
+from test.test_support import verbose, run_unittest
 from _locale import (setlocale, LC_NUMERIC, RADIXCHAR, THOUSEP, nl_langinfo,
                     localeconv, Error)
 import unittest
@@ -7,7 +7,7 @@
 if uname()[0] == "Darwin":
     maj, min, mic = [int(part) for part in uname()[2].split(".")]
     if (maj, min, mic) < (8, 0, 0):
-        raise SkipTest("locale support broken for OS X < 10.4")
+        raise unittest.SkipTest("locale support broken for OS X < 10.4")
 
 candidate_locales = ['es_UY', 'fr_FR', 'fi_FI', 'es_CO', 'pt_PT', 'it_IT',
     'et_EE', 'es_PY', 'no_NO', 'nl_NL', 'lv_LV', 'el_GR', 'be_BY', 'fr_BE',

Modified: python/trunk/Lib/test/test_commands.py
==============================================================================
--- python/trunk/Lib/test/test_commands.py	(original)
+++ python/trunk/Lib/test/test_commands.py	Thu Mar 26 22:10:30 2009
@@ -9,7 +9,7 @@
 warnings.filterwarnings('ignore', r".*commands.getstatus.. is deprecated",
                         DeprecationWarning)
 
-from test.test_support import SkipTest, run_unittest, reap_children
+from test.test_support import run_unittest, reap_children
 from commands import *
 
 # The module says:
@@ -19,7 +19,7 @@
 # I'll take the comment as given, and skip this suite.
 
 if os.name != 'posix':
-    raise SkipTest('Not posix; skipping test_commands')
+    raise unittest.SkipTest('Not posix; skipping test_commands')
 
 
 class CommandTests(unittest.TestCase):

Modified: python/trunk/Lib/test/test_curses.py
==============================================================================
--- python/trunk/Lib/test/test_curses.py	(original)
+++ python/trunk/Lib/test/test_curses.py	Thu Mar 26 22:10:30 2009
@@ -16,16 +16,16 @@
 # 'curses' resource be given on the regrtest command line using the -u
 # option.  If not available, nothing after this line will be executed.
 
-from test.test_support import requires, SkipTest
+from test.test_support import requires
 requires('curses')
 
 # XXX: if newterm was supported we could use it instead of initscr and not exit
 term = os.environ.get('TERM')
 if not term or term == 'unknown':
-    raise SkipTest, "$TERM=%r, calling initscr() may cause exit" % term
+    raise unittest.SkipTest, "$TERM=%r, calling initscr() may cause exit" % term
 
 if sys.platform == "cygwin":
-    raise SkipTest("cygwin's curses mostly just hangs")
+    raise unittest.SkipTest("cygwin's curses mostly just hangs")
 
 def window_funcs(stdscr):
     "Test the methods of windows"

Modified: python/trunk/Lib/test/test_decimal.py
==============================================================================
--- python/trunk/Lib/test/test_decimal.py	(original)
+++ python/trunk/Lib/test/test_decimal.py	Thu Mar 26 22:10:30 2009
@@ -31,8 +31,7 @@
 import unittest
 from decimal import *
 import numbers
-from test.test_support import (SkipTest, run_unittest, run_doctest,
-                               is_resource_enabled)
+from test.test_support import (run_unittest, run_doctest, is_resource_enabled)
 import random
 try:
     import threading
@@ -194,7 +193,7 @@
     def eval_file(self, file):
         global skip_expected
         if skip_expected:
-            raise SkipTest
+            raise unittest.SkipTest
             return
         for line in open(file).xreadlines():
             line = line.replace('\r\n', '').replace('\n', '')

Modified: python/trunk/Lib/test/test_dl.py
==============================================================================
--- python/trunk/Lib/test/test_dl.py	(original)
+++ python/trunk/Lib/test/test_dl.py	Thu Mar 26 22:10:30 2009
@@ -2,7 +2,7 @@
 """Test dlmodule.c
    Roger E. Masse  revised strategy by Barry Warsaw
 """
-from test.test_support import verbose,SkipTest, import_module
+from test.test_support import verbose, import_module
 dl = import_module('dl', deprecated=True)
 
 sharedlibs = [
@@ -31,7 +31,7 @@
                 print 'worked!'
             break
     else:
-        raise SkipTest, 'Could not open any shared libraries'
+        raise unittest.SkipTest, 'Could not open any shared libraries'
 
 
 if __name__ == '__main__':

Modified: python/trunk/Lib/test/test_fork1.py
==============================================================================
--- python/trunk/Lib/test/test_fork1.py	(original)
+++ python/trunk/Lib/test/test_fork1.py	Thu Mar 26 22:10:30 2009
@@ -4,12 +4,12 @@
 import os
 import time
 from test.fork_wait import ForkWait
-from test.test_support import SkipTest, run_unittest, reap_children
+from test.test_support import run_unittest, reap_children
 
 try:
     os.fork
 except AttributeError:
-    raise SkipTest, "os.fork not defined -- skipping test_fork1"
+    raise unittest.SkipTest, "os.fork not defined -- skipping test_fork1"
 
 class ForkTest(ForkWait):
     def wait_impl(self, cpid):

Modified: python/trunk/Lib/test/test_gl.py
==============================================================================
--- python/trunk/Lib/test/test_gl.py	(original)
+++ python/trunk/Lib/test/test_gl.py	Thu Mar 26 22:10:30 2009
@@ -3,7 +3,7 @@
     taken mostly from the documentation.
     Roger E. Masse
 """
-from test.test_support import verbose, SkipTest
+from test.test_support import verbose
 import gl, GL, time
 
 glattrs = ['RGBcolor', 'RGBcursor', 'RGBmode', 'RGBrange', 'RGBwritemask',
@@ -87,7 +87,7 @@
     try:
         display = os.environ['DISPLAY']
     except:
-        raise SkipTest, "No $DISPLAY -- skipping gl test"
+        raise unittest.SkipTest, "No $DISPLAY -- skipping gl test"
 
     # touch all the attributes of gl without doing anything
     if verbose:

Modified: python/trunk/Lib/test/test_ioctl.py
==============================================================================
--- python/trunk/Lib/test/test_ioctl.py	(original)
+++ python/trunk/Lib/test/test_ioctl.py	Thu Mar 26 22:10:30 2009
@@ -1,18 +1,18 @@
 import unittest
-from test.test_support import SkipTest, run_unittest
+from test.test_support import run_unittest
 import os, struct
 try:
     import fcntl, termios
 except ImportError:
-    raise SkipTest("No fcntl or termios module")
+    raise unittest.SkipTest("No fcntl or termios module")
 if not hasattr(termios,'TIOCGPGRP'):
-    raise SkipTest("termios module doesn't have TIOCGPGRP")
+    raise unittest.SkipTest("termios module doesn't have TIOCGPGRP")
 
 try:
     tty = open("/dev/tty", "r")
     tty.close()
 except IOError:
-    raise SkipTest("Unable to open /dev/tty")
+    raise unittest.SkipTest("Unable to open /dev/tty")
 
 try:
     import pty
@@ -41,7 +41,7 @@
 
     def test_ioctl_signed_unsigned_code_param(self):
         if not pty:
-            raise SkipTest('pty module required')
+            raise unittest.SkipTest('pty module required')
         mfd, sfd = pty.openpty()
         try:
             if termios.TIOCSWINSZ < 0:

Modified: python/trunk/Lib/test/test_largefile.py
==============================================================================
--- python/trunk/Lib/test/test_largefile.py	(original)
+++ python/trunk/Lib/test/test_largefile.py	Thu Mar 26 22:10:30 2009
@@ -6,7 +6,7 @@
 import sys
 import unittest
 from test.test_support import run_unittest, TESTFN, verbose, requires, \
-                              SkipTest, unlink
+                              unlink
 
 try:
     import signal
@@ -104,7 +104,7 @@
             # this is already decided before start running the test suite
             # but we do it anyway for extra protection
             if not hasattr(f, 'truncate'):
-                raise SkipTest, "open().truncate() not available on this system"
+                raise unittest.SkipTest, "open().truncate() not available on this system"
             f.seek(0, 2)
             # else we've lost track of the true size
             self.assertEqual(f.tell(), size+1)
@@ -155,7 +155,7 @@
         except (IOError, OverflowError):
             f.close()
             unlink(TESTFN)
-            raise SkipTest, "filesystem does not have largefile support"
+            raise unittest.SkipTest, "filesystem does not have largefile support"
         else:
             f.close()
     suite = unittest.TestSuite()

Modified: python/trunk/Lib/test/test_linuxaudiodev.py
==============================================================================
--- python/trunk/Lib/test/test_linuxaudiodev.py	(original)
+++ python/trunk/Lib/test/test_linuxaudiodev.py	Thu Mar 26 22:10:30 2009
@@ -1,7 +1,7 @@
 from test import test_support
 test_support.requires('audio')
 
-from test.test_support import findfile, SkipTest, run_unittest
+from test.test_support import findfile, run_unittest
 
 import errno
 linuxaudiodev = test_support.import_module('linuxaudiodev', deprecated=True)
@@ -89,7 +89,7 @@
         dsp = linuxaudiodev.open('w')
     except linuxaudiodev.error, msg:
         if msg.args[0] in (errno.EACCES, errno.ENOENT, errno.ENODEV, errno.EBUSY):
-            raise SkipTest(msg)
+            raise unittest.SkipTest(msg)
         raise
     dsp.close()
     run_unittest(LinuxAudioDevTests)

Modified: python/trunk/Lib/test/test_locale.py
==============================================================================
--- python/trunk/Lib/test/test_locale.py	(original)
+++ python/trunk/Lib/test/test_locale.py	Thu Mar 26 22:10:30 2009
@@ -1,4 +1,4 @@
-from test.test_support import run_unittest, verbose, SkipTest
+from test.test_support import run_unittest, verbose
 import unittest
 import locale
 import sys
@@ -10,7 +10,7 @@
 def get_enUS_locale():
     global enUS_locale
     if sys.platform == 'darwin':
-        raise SkipTest("Locale support on MacOSX is minimal")
+        raise unittest.SkipTest("Locale support on MacOSX is minimal")
     if sys.platform.startswith("win"):
         tlocs = ("En", "English")
     else:
@@ -23,7 +23,7 @@
             continue
         break
     else:
-        raise SkipTest(
+        raise unittest.SkipTest(
             "Test locale not supported (tried %s)" % (', '.join(tlocs)))
     enUS_locale = tloc
     locale.setlocale(locale.LC_NUMERIC, oldlocale)

Modified: python/trunk/Lib/test/test_mhlib.py
==============================================================================
--- python/trunk/Lib/test/test_mhlib.py	(original)
+++ python/trunk/Lib/test/test_mhlib.py	Thu Mar 26 22:10:30 2009
@@ -7,7 +7,7 @@
 ###      mhlib.  It should.
 
 import unittest
-from test.test_support import run_unittest, TESTFN, SkipTest, import_module
+from test.test_support import run_unittest, TESTFN, import_module
 import os, StringIO
 import sys
 mhlib = import_module('mhlib', deprecated=True)
@@ -21,8 +21,8 @@
     # link counts, and that causes test_listfolders() here to get back
     # an empty list from its call of listallfolders().
     # The other tests here pass on Windows.
-    raise SkipTest("skipped on %s -- " % sys.platform +
-                      "too many Unix assumptions")
+    raise unittest.SkipTest("skipped on %s -- " % sys.platform +
+                            "too many Unix assumptions")
 
 _mhroot = TESTFN+"_MH"
 _mhpath = os.path.join(_mhroot, "MH")

Modified: python/trunk/Lib/test/test_minidom.py
==============================================================================
--- python/trunk/Lib/test/test_minidom.py	(original)
+++ python/trunk/Lib/test/test_minidom.py	Thu Mar 26 22:10:30 2009
@@ -4,7 +4,7 @@
 import sys
 import pickle
 from StringIO import StringIO
-from test.test_support import verbose, run_unittest, SkipTest
+from test.test_support import verbose, run_unittest
 import unittest
 
 import xml.dom

Modified: python/trunk/Lib/test/test_multiprocessing.py
==============================================================================
--- python/trunk/Lib/test/test_multiprocessing.py	(original)
+++ python/trunk/Lib/test/test_multiprocessing.py	Thu Mar 26 22:10:30 2009
@@ -23,8 +23,7 @@
 try:
     import multiprocessing.synchronize
 except ImportError, e:
-    from test.test_support import SkipTest
-    raise SkipTest(e)
+    raise unittest.SkipTest(e)
 
 import multiprocessing.dummy
 import multiprocessing.connection
@@ -1813,7 +1812,7 @@
             lock = multiprocessing.RLock()
         except OSError:
             from test.test_support import SkipTest
-            raise SkipTest("OSError raises on RLock creation, see issue 3111!")
+            raise unittest.SkipTest("OSError raises on RLock creation, see issue 3111!")
 
     if run is None:
         from test.test_support import run_unittest as run

Modified: python/trunk/Lib/test/test_openpty.py
==============================================================================
--- python/trunk/Lib/test/test_openpty.py	(original)
+++ python/trunk/Lib/test/test_openpty.py	Thu Mar 26 22:10:30 2009
@@ -1,10 +1,10 @@
 # Test to see if openpty works. (But don't worry if it isn't available.)
 
 import os, unittest
-from test.test_support import run_unittest, SkipTest
+from test.test_support import run_unittest
 
 if not hasattr(os, "openpty"):
-    raise SkipTest, "No openpty() available."
+    raise unittest.SkipTest, "No openpty() available."
 
 
 class OpenptyTest(unittest.TestCase):

Modified: python/trunk/Lib/test/test_ossaudiodev.py
==============================================================================
--- python/trunk/Lib/test/test_ossaudiodev.py	(original)
+++ python/trunk/Lib/test/test_ossaudiodev.py	Thu Mar 26 22:10:30 2009
@@ -1,7 +1,7 @@
 from test import test_support
 test_support.requires('audio')
 
-from test.test_support import findfile, SkipTest
+from test.test_support import findfile
 
 import errno
 import ossaudiodev
@@ -45,7 +45,7 @@
             dsp = ossaudiodev.open('w')
         except IOError, msg:
             if msg[0] in (errno.EACCES, errno.ENOENT, errno.ENODEV, errno.EBUSY):
-                raise SkipTest(msg)
+                raise unittest.SkipTest(msg)
             raise
 
         # at least check that these methods can be invoked
@@ -162,7 +162,7 @@
         dsp = ossaudiodev.open('w')
     except (ossaudiodev.error, IOError), msg:
         if msg[0] in (errno.EACCES, errno.ENOENT, errno.ENODEV, errno.EBUSY):
-            raise SkipTest(msg)
+            raise unittest.SkipTest(msg)
         raise
     dsp.close()
     test_support.run_unittest(__name__)

Modified: python/trunk/Lib/test/test_pipes.py
==============================================================================
--- python/trunk/Lib/test/test_pipes.py	(original)
+++ python/trunk/Lib/test/test_pipes.py	Thu Mar 26 22:10:30 2009
@@ -2,10 +2,10 @@
 import os
 import string
 import unittest
-from test.test_support import TESTFN, run_unittest, unlink, SkipTest
+from test.test_support import TESTFN, run_unittest, unlink
 
 if os.name != 'posix':
-    raise SkipTest('pipes module only works on posix')
+    raise unittest.SkipTest('pipes module only works on posix')
 
 TESTFN2 = TESTFN + "2"
 

Modified: python/trunk/Lib/test/test_poll.py
==============================================================================
--- python/trunk/Lib/test/test_poll.py	(original)
+++ python/trunk/Lib/test/test_poll.py	Thu Mar 26 22:10:30 2009
@@ -1,12 +1,12 @@
 # Test case for the os.poll() function
 
 import os, select, random, unittest
-from test.test_support import SkipTest, TESTFN, run_unittest
+from test.test_support import TESTFN, run_unittest
 
 try:
     select.poll
 except AttributeError:
-    raise SkipTest, "select.poll not defined -- skipping test_poll"
+    raise unittest.SkipTest, "select.poll not defined -- skipping test_poll"
 
 
 def find_ready_matching(ready, flag):

Modified: python/trunk/Lib/test/test_popen2.py
==============================================================================
--- python/trunk/Lib/test/test_popen2.py	(original)
+++ python/trunk/Lib/test/test_popen2.py	Thu Mar 26 22:10:30 2009
@@ -12,13 +12,13 @@
 import unittest
 import popen2
 
-from test.test_support import SkipTest, run_unittest, reap_children
+from test.test_support import run_unittest, reap_children
 
 if sys.platform[:4] == 'beos' or sys.platform[:6] == 'atheos':
     #  Locks get messed up or something.  Generally we're supposed
     #  to avoid mixing "posix" fork & exec with native threads, and
     #  they may be right about that after all.
-    raise SkipTest("popen2() doesn't work on " + sys.platform)
+    raise unittest.SkipTest("popen2() doesn't work on " + sys.platform)
 
 # if we don't have os.popen, check that
 # we have os.fork.  if not, skip the test

Modified: python/trunk/Lib/test/test_pty.py
==============================================================================
--- python/trunk/Lib/test/test_pty.py	(original)
+++ python/trunk/Lib/test/test_pty.py	Thu Mar 26 22:10:30 2009
@@ -4,7 +4,7 @@
 import os
 import sys
 import signal
-from test.test_support import verbose, SkipTest, run_unittest
+from test.test_support import verbose, run_unittest
 import unittest
 
 TEST_STRING_1 = "I wish to buy a fish license.\n"
@@ -69,7 +69,7 @@
             debug("Got slave_fd '%d'" % slave_fd)
         except OSError:
             # " An optional feature could not be imported " ... ?
-            raise SkipTest, "Pseudo-terminals (seemingly) not functional."
+            raise unittest.SkipTest, "Pseudo-terminals (seemingly) not functional."
 
         self.assertTrue(os.isatty(slave_fd), 'slave_fd is not a tty')
 

Modified: python/trunk/Lib/test/test_py3kwarn.py
==============================================================================
--- python/trunk/Lib/test/test_py3kwarn.py	(original)
+++ python/trunk/Lib/test/test_py3kwarn.py	Thu Mar 26 22:10:30 2009
@@ -1,13 +1,12 @@
 import unittest
 import sys
-from test.test_support import (check_warnings, CleanImport,
-                               SkipTest, run_unittest)
+from test.test_support import check_warnings, CleanImport, run_unittest
 import warnings
 
 from contextlib import nested
 
 if not sys.py3kwarning:
-    raise SkipTest('%s must be run with the -3 flag' % __name__)
+    raise unittest.SkipTest('%s must be run with the -3 flag' % __name__)
 
 def reset_module_registry(module):
     try:

Modified: python/trunk/Lib/test/test_site.py
==============================================================================
--- python/trunk/Lib/test/test_site.py	(original)
+++ python/trunk/Lib/test/test_site.py	Thu Mar 26 22:10:30 2009
@@ -5,7 +5,7 @@
 
 """
 import unittest
-from test.test_support import SkipTest, run_unittest, TESTFN
+from test.test_support import run_unittest, TESTFN
 import __builtin__
 import os
 import sys
@@ -17,7 +17,7 @@
 if "site" in sys.modules:
     import site
 else:
-    raise SkipTest("importation of site.py suppressed")
+    raise unittest.SkipTest("importation of site.py suppressed")
 
 if not os.path.isdir(site.USER_SITE):
     # need to add user site directory for tests

Modified: python/trunk/Lib/test/test_socketserver.py
==============================================================================
--- python/trunk/Lib/test/test_socketserver.py	(original)
+++ python/trunk/Lib/test/test_socketserver.py	Thu Mar 26 22:10:30 2009
@@ -16,7 +16,7 @@
 import SocketServer
 
 import test.test_support
-from test.test_support import reap_children, verbose, SkipTest
+from test.test_support import reap_children, verbose
 from test.test_support import TESTFN as TEST_FILE
 
 test.test_support.requires("network")
@@ -247,7 +247,7 @@
 def test_main():
     if imp.lock_held():
         # If the import lock is held, the threads will hang
-        raise SkipTest("can't run when import lock is held")
+        raise unittest.SkipTest("can't run when import lock is held")
 
     test.test_support.run_unittest(SocketServerTest)
 

Modified: python/trunk/Lib/test/test_sqlite.py
==============================================================================
--- python/trunk/Lib/test/test_sqlite.py	(original)
+++ python/trunk/Lib/test/test_sqlite.py	Thu Mar 26 22:10:30 2009
@@ -1,9 +1,10 @@
-from test.test_support import run_unittest, SkipTest
+import unittest
+from test.test_support import run_unittest
 
 try:
     import _sqlite3
 except ImportError:
-    raise SkipTest('no sqlite available')
+    raise unittest.SkipTest('no sqlite available')
 from sqlite3.test import (dbapi, types, userfunctions, py25tests,
                                 factory, transactions, hooks, regression,
                                 dump)

Modified: python/trunk/Lib/test/test_sunaudiodev.py
==============================================================================
--- python/trunk/Lib/test/test_sunaudiodev.py	(original)
+++ python/trunk/Lib/test/test_sunaudiodev.py	Thu Mar 26 22:10:30 2009
@@ -1,4 +1,5 @@
-from test.test_support import findfile, TestFailed, SkipTest, import_module
+from test.test_support import findfile, TestFailed, import_module
+import unittest
 sunaudiodev = import_module('sunaudiodev', deprecated=True)
 import os
 
@@ -8,7 +9,7 @@
     audiodev = "/dev/audio"
 
 if not os.path.exists(audiodev):
-    raise SkipTest("no audio device found!")
+    raise unittest.SkipTest("no audio device found!")
 
 def play_sound_file(path):
     fp = open(path, 'r')

Modified: python/trunk/Lib/test/test_support.py
==============================================================================
--- python/trunk/Lib/test/test_support.py	(original)
+++ python/trunk/Lib/test/test_support.py	Thu Mar 26 22:10:30 2009
@@ -51,7 +51,7 @@
         try:
             module = __import__(name, level=0)
         except ImportError:
-            raise SkipTest("No module named " + name)
+            raise unittest.SkipTest("No module named " + name)
         else:
             return module
 

Modified: python/trunk/Lib/test/test_threaded_import.py
==============================================================================
--- python/trunk/Lib/test/test_threaded_import.py	(original)
+++ python/trunk/Lib/test/test_threaded_import.py	Thu Mar 26 22:10:30 2009
@@ -6,7 +6,7 @@
 # randrange, and then Python hangs.
 
 import thread
-from test.test_support import verbose, SkipTest, TestFailed
+from test.test_support import verbose, TestFailed
 
 critical_section = thread.allocate_lock()
 done = thread.allocate_lock()
@@ -56,7 +56,7 @@
     import imp
     if imp.lock_held():
         # This triggers on, e.g., from test import autotest.
-        raise SkipTest("can't run when import lock is held")
+        raise unittest.SkipTest("can't run when import lock is held")
 
     done.acquire()
     for N in (20, 50) * 3:

Modified: python/trunk/Lib/test/test_threadsignals.py
==============================================================================
--- python/trunk/Lib/test/test_threadsignals.py	(original)
+++ python/trunk/Lib/test/test_threadsignals.py	Thu Mar 26 22:10:30 2009
@@ -5,10 +5,10 @@
 import signal
 import os
 import sys
-from test.test_support import run_unittest, SkipTest
+from test.test_support import run_unittest
 
 if sys.platform[:3] in ('win', 'os2') or sys.platform=='riscos':
-    raise SkipTest, "Can't test signal on %s" % sys.platform
+    raise unittest.SkipTest, "Can't test signal on %s" % sys.platform
 
 process_pid = os.getpid()
 signalled_all=thread.allocate_lock()

Modified: python/trunk/Lib/test/test_unicode_file.py
==============================================================================
--- python/trunk/Lib/test/test_unicode_file.py	(original)
+++ python/trunk/Lib/test/test_unicode_file.py	Thu Mar 26 22:10:30 2009
@@ -5,14 +5,14 @@
 import unicodedata
 
 import unittest
-from test.test_support import run_unittest, SkipTest, TESTFN_UNICODE
+from test.test_support import run_unittest, TESTFN_UNICODE
 from test.test_support import TESTFN_ENCODING, TESTFN_UNICODE_UNENCODEABLE
 try:
     TESTFN_ENCODED = TESTFN_UNICODE.encode(TESTFN_ENCODING)
 except (UnicodeError, TypeError):
     # Either the file system encoding is None, or the file name
     # cannot be encoded in the file system encoding.
-    raise SkipTest("No Unicode filesystem semantics on this platform.")
+    raise unittest.SkipTest("No Unicode filesystem semantics on this platform.")
 
 if TESTFN_ENCODED.decode(TESTFN_ENCODING) != TESTFN_UNICODE:
     # The file system encoding does not support Latin-1
@@ -26,10 +26,10 @@
             # MBCS will not report the error properly
             raise UnicodeError, "mbcs encoding problem"
     except (UnicodeError, TypeError):
-        raise SkipTest("Cannot find a suiteable filename.")
+        raise unittest.SkipTest("Cannot find a suiteable filename.")
 
 if TESTFN_ENCODED.decode(TESTFN_ENCODING) != TESTFN_UNICODE:
-    raise SkipTest("Cannot find a suitable filename.")
+    raise unittest.SkipTest("Cannot find a suitable filename.")
 
 def remove_if_exists(filename):
     if os.path.exists(filename):

Modified: python/trunk/Lib/test/test_wait3.py
==============================================================================
--- python/trunk/Lib/test/test_wait3.py	(original)
+++ python/trunk/Lib/test/test_wait3.py	Thu Mar 26 22:10:30 2009
@@ -3,18 +3,19 @@
 
 import os
 import time
+import unittest
 from test.fork_wait import ForkWait
-from test.test_support import SkipTest, run_unittest, reap_children
+from test.test_support import run_unittest, reap_children
 
 try:
     os.fork
 except AttributeError:
-    raise SkipTest, "os.fork not defined -- skipping test_wait3"
+    raise unittest.SkipTest, "os.fork not defined -- skipping test_wait3"
 
 try:
     os.wait3
 except AttributeError:
-    raise SkipTest, "os.wait3 not defined -- skipping test_wait3"
+    raise unittest.SkipTest, "os.wait3 not defined -- skipping test_wait3"
 
 class Wait3Test(ForkWait):
     def wait_impl(self, cpid):

Modified: python/trunk/Lib/test/test_wait4.py
==============================================================================
--- python/trunk/Lib/test/test_wait4.py	(original)
+++ python/trunk/Lib/test/test_wait4.py	Thu Mar 26 22:10:30 2009
@@ -4,17 +4,17 @@
 import os
 import time
 from test.fork_wait import ForkWait
-from test.test_support import SkipTest, run_unittest, reap_children
+from test.test_support import run_unittest, reap_children
 
 try:
     os.fork
 except AttributeError:
-    raise SkipTest, "os.fork not defined -- skipping test_wait4"
+    raise unittest.SkipTest, "os.fork not defined -- skipping test_wait4"
 
 try:
     os.wait4
 except AttributeError:
-    raise SkipTest, "os.wait4 not defined -- skipping test_wait4"
+    raise unittest.SkipTest, "os.wait4 not defined -- skipping test_wait4"
 
 class Wait4Test(ForkWait):
     def wait_impl(self, cpid):


More information about the Python-checkins mailing list