summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--Lib/test/test_posix.py4
-rw-r--r--Lib/test/test_pty.py11
2 files changed, 10 insertions, 5 deletions
diff --git a/Lib/test/test_posix.py b/Lib/test/test_posix.py
index ff9b106..8d1bb59 100644
--- a/Lib/test/test_posix.py
+++ b/Lib/test/test_posix.py
@@ -1,7 +1,9 @@
"Test posix functions"
from test import support
-posix = support.import_module('posix') #skip if not supported
+
+# Skip these tests if there is no posix module.
+posix = support.import_module('posix')
import time
import os
diff --git a/Lib/test/test_pty.py b/Lib/test/test_pty.py
index 66c4de3..e74ecd5 100644
--- a/Lib/test/test_pty.py
+++ b/Lib/test/test_pty.py
@@ -1,11 +1,14 @@
-from test import support
-pty = support.import_module("pty") #skip if not supported
+from 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.support import verbose, run_unittest
import unittest
TEST_STRING_1 = b"I wish to buy a fish license.\n"