1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
|
# flake8: noqa
import contextlib
import builtins
import sys
from test.support import requires_zlib
import test.support
ModuleNotFoundError = getattr(builtins, 'ModuleNotFoundError', ImportError)
try:
from test.support.warnings_helper import check_warnings
except (ModuleNotFoundError, ImportError):
from test.support import check_warnings
try:
from test.support.os_helper import (
rmtree,
EnvironmentVarGuard,
unlink,
skip_unless_symlink,
temp_dir,
)
except (ModuleNotFoundError, ImportError):
from test.support import (
rmtree,
EnvironmentVarGuard,
unlink,
skip_unless_symlink,
temp_dir,
)
try:
from test.support.import_helper import (
DirsOnSysPath,
CleanImport,
)
except (ModuleNotFoundError, ImportError):
from test.support import (
DirsOnSysPath,
CleanImport,
)
if sys.version_info < (3, 9):
requires_zlib = lambda: test.support.requires_zlib
|