Index: Lib/test/test_posix.py =================================================================== --- Lib/test/test_posix.py (revision 71778) +++ Lib/test/test_posix.py (working copy) @@ -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) Index: Lib/test/test_pty.py =================================================================== --- Lib/test/test_pty.py (revision 71778) +++ Lib/test/test_pty.py (working copy) @@ -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"