mirror of
https://github.com/python/cpython.git
synced 2025-07-29 06:05:00 +00:00
Restore skips of posix and pty tests on Windows by calling the
test_support.import_module on the appropriate modules before any other imports.
This commit is contained in:
parent
7c2867fcb1
commit
95fb46c977
2 changed files with 8 additions and 3 deletions
|
@ -2,6 +2,8 @@
|
||||||
|
|
||||||
from test import test_support
|
from test import test_support
|
||||||
|
|
||||||
|
# Skip these tests if there is no posix module.
|
||||||
|
posix = test_support.import_module('posix')
|
||||||
|
|
||||||
import time
|
import time
|
||||||
import os
|
import os
|
||||||
|
@ -10,7 +12,6 @@ import shutil
|
||||||
import unittest
|
import unittest
|
||||||
import warnings
|
import warnings
|
||||||
|
|
||||||
posix = test_support.import_module('posix')
|
|
||||||
|
|
||||||
warnings.filterwarnings('ignore', '.* potential security risk .*',
|
warnings.filterwarnings('ignore', '.* potential security risk .*',
|
||||||
RuntimeWarning)
|
RuntimeWarning)
|
||||||
|
|
|
@ -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 errno
|
||||||
import fcntl
|
|
||||||
import pty
|
import pty
|
||||||
import os
|
import os
|
||||||
import sys
|
import sys
|
||||||
import signal
|
import signal
|
||||||
from test.test_support import verbose, run_unittest
|
|
||||||
import unittest
|
import unittest
|
||||||
|
|
||||||
TEST_STRING_1 = "I wish to buy a fish license.\n"
|
TEST_STRING_1 = "I wish to buy a fish license.\n"
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue