summaryrefslogtreecommitdiff
path: root/Lib/test/test_fcntl.py
diff options
context:
space:
mode:
Diffstat (limited to 'Lib/test/test_fcntl.py')
-rwxr-xr-xLib/test/test_fcntl.py7
1 files changed, 5 insertions, 2 deletions
diff --git a/Lib/test/test_fcntl.py b/Lib/test/test_fcntl.py
index afb511cd06..72748f9516 100755
--- a/Lib/test/test_fcntl.py
+++ b/Lib/test/test_fcntl.py
@@ -3,12 +3,15 @@
OS/2+EMX doesn't support the file locking operations.
"""
-import fcntl
import os
import struct
import sys
import unittest
-from test.support import verbose, TESTFN, unlink, run_unittest
+from test.support import verbose, TESTFN, unlink, run_unittest, import_module
+
+# Skip test if no fnctl module.
+fcntl = import_module('fcntl')
+
# TODO - Write tests for flock() and lockf().