]> granicus.if.org Git - python/commitdiff
Allow skipping of regression tests not supported on windows. This reduces noise...
authorKristján Valur Jónsson <kristjan@ccpgames.com>
Wed, 1 Apr 2009 11:28:47 +0000 (11:28 +0000)
committerKristján Valur Jónsson <kristjan@ccpgames.com>
Wed, 1 Apr 2009 11:28:47 +0000 (11:28 +0000)
Lib/test/regrtest.py
Lib/test/test_dbm_gnu.py
Lib/test/test_dbm_ndbm.py
Lib/test/test_posix.py
Lib/test/test_pty.py
Lib/test/test_syslog.py
Lib/test/test_tk.py

index edfaa9a01cfe23c3e2a44e3f9e94387a4fb778d4..f970404b95ac0be2b18b1bb14651345d6a192036 100755 (executable)
@@ -892,6 +892,7 @@ _expectations = {
         test_fork1
         test_epoll
         test_dbm_gnu
+        test_dbm_ndbm
         test_grp
         test_ioctl
         test_largefile
index 73203b67733f95c0dc27ff02f7ec472935d37efb..857aeb1acca62869308ca2428af78f8a45bdf4d1 100755 (executable)
@@ -1,4 +1,5 @@
-import dbm.gnu as gdbm
+from test import support
+gdbm = support.import_module("dbm.gnu") #skip if not supported
 import unittest
 import os
 from test.support import verbose, TESTFN, run_unittest, unlink
index 6d0a36de7081a998685da168e2eeef68d67f3f35..c5e968fde448d4c60016d6a70ef60002fc013564 100755 (executable)
@@ -1,4 +1,5 @@
 from test import support
+support.import_module("dbm.ndbm") #skip if not supported
 import unittest
 import os
 import random
index b1a9caf9acf23104c7c836dc65e3d16f39503a08..ff9b106e1c47f5d21ee3b1335c38f8be57fcf3fa 100644 (file)
@@ -1,6 +1,7 @@
 "Test posix functions"
 
 from test import support
+posix = support.import_module('posix') #skip if not supported
 
 import time
 import os
@@ -9,8 +10,6 @@ import shutil
 import unittest
 import warnings
 
-posix = support.import_module('posix')
-
 warnings.filterwarnings('ignore', '.* potential security risk .*',
                         RuntimeWarning)
 
index 3be7c97b6e68b4d38d35b292a2d026cce00bd8c4..66c4de332473e2ac383484fec914ae42130dd985 100644 (file)
@@ -1,6 +1,7 @@
+from test import support
+pty = support.import_module("pty") #skip if not supported
 import errno
 import fcntl
-import pty
 import os
 import sys
 import signal
index 3a3d63555f3de6f01fdf060b8244a2f26e2c7f3f..028dcb49aaffa7d2acf9d119ee26ef74e312457d 100644 (file)
@@ -1,7 +1,7 @@
 
-import syslog
-import unittest
 from test import support
+syslog = support.import_module("syslog") #skip if not supported
+import unittest
 
 # XXX(nnorwitz): This test sucks.  I don't know of a platform independent way
 # to verify that the messages were really logged.
index 2eca27b2b06818df75c6151ca361e7a5a7593a11..80316b3684289c877db88c837d4c1895309a16ad 100644 (file)
@@ -1,10 +1,11 @@
+from test import support
+# Skip test if _tkinter wasn't built.
+support.import_module('_tkinter')
+
 import tkinter
 from tkinter.test import runtktests
-from test import support
 import unittest
 
-# Skip test if _tkinter wasn't built.
-support.import_module('_tkinter')
 
 import tkinter