[Python-checkins] r71785 - in python/trunk/Lib/test: test_posix.py test_pty.py
r.david.murray
python-checkins at python.org
Tue Apr 21 15:06:04 CEST 2009
Author: r.david.murray
Date: Tue Apr 21 15:06:04 2009
New Revision: 71785
Log:
Restore skips of posix and pty tests on Windows by calling the
test_support.import_module on the appropriate modules
before any other imports.
Modified:
python/trunk/Lib/test/test_posix.py
python/trunk/Lib/test/test_pty.py
Modified: python/trunk/Lib/test/test_posix.py
==============================================================================
--- python/trunk/Lib/test/test_posix.py (original)
+++ python/trunk/Lib/test/test_posix.py Tue Apr 21 15:06:04 2009
@@ -2,6 +2,8 @@
from test import test_support
+# Skip these tests if there is no posix module.
+posix = test_support.import_module('posix')
import time
import os
@@ -10,7 +12,6 @@
import unittest
import warnings
-posix = test_support.import_module('posix')
warnings.filterwarnings('ignore', '.* potential security risk .*',
RuntimeWarning)
Modified: python/trunk/Lib/test/test_pty.py
==============================================================================
--- python/trunk/Lib/test/test_pty.py (original)
+++ python/trunk/Lib/test/test_pty.py Tue Apr 21 15:06:04 2009
@@ -1,10 +1,14 @@
+from test.test_support import verbose, run_unittest, import_module
+
+#Skip these tests if either fcntl or termios is not available
+fcntl = import_module('fcntl')
+import_module('termios')
+
import errno
-import fcntl
import pty
import os
import sys
import signal
-from test.test_support import verbose, run_unittest
import unittest
TEST_STRING_1 = "I wish to buy a fish license.\n"
More information about the Python-checkins
mailing list