from .findtests import findtests, split_test_packages, list_cases
from .logger import Logger
from .pgo import setup_pgo_tests
-from .result import State, TestResult
+from .result import TestResult
from .results import TestResults, EXITCODE_INTERRUPTED
from .runtests import RunTests, HuntRefleak
from .setup import setup_process, setup_test_dir
"""Run a test case multiple times in parallel threads."""
import copy
-import functools
import threading
import unittest
import random
import re
import shlex
-import signal
import subprocess
import sys
import sysconfig
import sys
import sysconfig
import tempfile
-import unittest
import venv
import unittest
from unittest import mock
import weakref
-import warnings
if sys.platform not in ('win32', 'vxworks'):
import tty
from test.support import socket_helper
from test.support import threading_helper
from test.support import ALWAYS_EQ, LARGEST, SMALLEST
-from test.support import warnings_helper
def tearDownModule():
asyncio._set_event_loop_policy(None)
"""Tests for streams.py."""
import gc
-import os
import queue
import pickle
import socket
-import sys
import threading
import unittest
from unittest import mock
-import warnings
try:
import ssl
except ImportError:
import asyncio
from test.test_asyncio import utils as test_utils
-from test.support import requires_subprocess, socket_helper
+from test.support import socket_helper
def tearDownModule():
import socket
import stat
import sys
-import threading
import time
import unittest
from unittest import mock
-import warnings
from test import support
from test.support import os_helper
import asyncio
-from asyncio import log
from asyncio import unix_events
from test.test_asyncio import utils as test_utils
import threading
import unittest
import weakref
-import warnings
from ast import literal_eval
from unittest import mock
import random
import re
import sys
-import textwrap
import traceback
import types
import typing
import copy
import functools
import pickle
-import sysconfig
import tempfile
import textwrap
import threading
import unittest
from test.support import (cpython_only, is_wasi, requires_limited_api, Py_DEBUG,
- set_recursion_limit, skip_on_s390x, exceeds_recursion_limit, skip_emscripten_stack_overflow, skip_wasi_stack_overflow,
- skip_if_sanitizer, import_helper)
+ set_recursion_limit, skip_on_s390x,
+ skip_emscripten_stack_overflow,
+ skip_wasi_stack_overflow, skip_if_sanitizer,
+ import_helper)
try:
import _testcapi
except ImportError:
"""
Tests PyConfig_Get() and PyConfig_Set() C API (PEP 741).
"""
-import os
import sys
import sysconfig
import types
import io
import os
import unittest
-import warnings
from test import support
from test.support import import_helper, os_helper, warnings_helper
-import unittest
-import math
import string
import sys
+import unittest
from test import support
from test.support import import_helper
from test.support import script_helper
import itertools
import operator
-import sys
import unittest
import warnings
-from test.support import cpython_only, import_helper
+from test.support import import_helper
_testcapi = import_helper.import_module('_testcapi')
from _testcapi import PY_SSIZE_T_MAX, PY_SSIZE_T_MIN
import unittest
-import sys
import gc
-from collections import namedtuple
from test.support import import_helper
_testcapi = import_helper.import_module('_testcapi')
import dis
import io
import itertools
-import marshal
import math
import opcode
import os
import io
import os
import pickle
-import sys
import time
import unittest
from concurrent.futures.interpreter import (
import os
import queue
-import signal
import sys
import threading
import time
import unittest
import sys
from ctypes import Structure, Union, sizeof, c_char, c_int
-from ._support import (CField, Py_TPFLAGS_DISALLOW_INSTANTIATION,
- Py_TPFLAGS_IMMUTABLETYPE)
+from ._support import CField, Py_TPFLAGS_IMMUTABLETYPE
NOTHING = object()
import sys
import unittest
-from test.support import swap_item, swap_attr, skip_wasi_stack_overflow, Py_DEBUG
+from test.support import swap_item, swap_attr, skip_wasi_stack_overflow
class RebindBuiltinsTests(unittest.TestCase):
# Run the tests in Programs/_testembed.c (tests for the CPython embedding APIs)
from test import support
-from test.libregrtest.utils import get_build_info
from test.support import import_helper, os_helper, threading_helper, MS_WINDOWS
import unittest
from collections import namedtuple
import contextlib
-import io
import json
import os
import os.path