tricky or non-obvious code is not worth it. For people looking for
maximum performance, they should use something like gmpy2."""
-import sys
import re
import decimal
from concurrent.futures import _base
import queue
import multiprocessing as mp
+# This import is required to load the multiprocessing.connection submodule
+# so that it can be accessed later as `mp.connection`
import multiprocessing.connection
from multiprocessing.queues import Queue
import threading
import types
import inspect
import keyword
-import builtins
import functools
import itertools
import abc
"""Subset of importlib.abc used to reduce importlib.util imports."""
from . import _bootstrap
import abc
-import warnings
class Loader(metaclass=abc.ABCMeta):
import os
import sys
import threading
-from os.path import pardir, realpath
+from os.path import realpath
__all__ = [
'get_config_h_filename',
import multiprocessing
import random
import sys
-import time
def fill_queue(queue, code):
queue.put(code)
active threads survive in the child after a fork(); this is an error.
"""
-import os, sys, time, unittest
+import os, time, unittest
import threading
from test import support
from test.support import threading_helper
from collections import namedtuple
import contextlib
-import os
import sys
from textwrap import dedent
import threading
-from collections import namedtuple
import contextlib
import itertools
import os
import sys
from textwrap import dedent
import threading
-import time
import unittest
import _testcapi
import types
import unittest
import contextlib
-import warnings
from test.support.import_helper import import_module
from test.support import gc_collect, requires_working_socket
import asyncio
-import asyncio.sslproto
import contextlib
import gc
import logging
import os
-import shutil
import signal
import sys
import unittest
-import sys
import functools
import unittest
from test import support
class B:
def __init__(self):
self.z = 100
- pass
# Make sure that declaring this class doesn't raise an error.
# The issue is that we can't override __init__ in our class,
from test import support
from test.support import ALWAYS_EQ
from test.support import threading_helper
-from textwrap import dedent
from datetime import timedelta
python_version = sys.version_info[:2]
#
class SillyInt(HexInt):
__qualname__ = 'SillyInt'
- pass
class MyOtherEnum(SillyInt, enum.Enum):
__qualname__ = 'MyOtherEnum'
D = 4
from test.support import check_syntax_error
from test.support import import_helper
-from test.support.warnings_helper import check_syntax_warning
import inspect
import unittest
import sys
# with import machinery
import test.ann_module as ann_module
import typing
-from collections import ChainMap
from test import ann_module2
import test
from test.support import os_helper
from test.support import requires_resource
from test.support import threading_helper
-from test.support import warnings_helper
from http.client import HTTPException
import re
import socket
import threading
-import warnings
import unittest
from unittest import mock
from test import support
from test.support import os_helper
from test.support import socket_helper
-from test.support import warnings_helper
support.requires_working_socket(module=True)
from test.support import verbose, run_with_tz, run_with_locale, cpython_only
from test.support import hashlib_helper
from test.support import threading_helper
-from test.support import warnings_helper
import unittest
from unittest import mock
from datetime import datetime, timezone, timedelta
typ, data = client.login('user', 'pass')
self.assertEqual(typ, 'OK')
client.enable('UTF8=ACCEPT')
- pass
@threading_helper.reap_threads
def test_enable_UTF8_True_append(self):
# testing of error conditions uncovered when using extension types.
import unittest
-import sys
import typing
from test import support
from test import support
import unittest
-import pyexpat
import xml.dom.minidom
from xml.dom.minidom import parse, Attr, Node, Document, parseString
generate_parser_c_extension,
generate_c_parser_source,
)
- from pegen.ast_dump import ast_dump
TEST_TEMPLATE = """
import shlex
import string
import unittest
-from unittest import mock
# The original test data set was from shellwords, by Hartmut Goebel.
import pprint
import sys
import unittest
-from test import support
class TestGetProfile(unittest.TestCase):
from test import support
import unittest
-from unittest.mock import MagicMock
import sys
import difflib
import gc
AbstractDefaultRootTest)
from test.test_tkinter.widget_tests import (
add_standard_options,
- AbstractWidgetTest, StandardOptionsTests, IntegerSizeTests, PixelSizeTests,
- setUpModule)
+ AbstractWidgetTest, StandardOptionsTests, IntegerSizeTests, PixelSizeTests)
requires('gui')
"""
import os
-import sys
import unittest
from test.support import import_helper
import sys
import types
import inspect
-import importlib
import builtins
import unittest
import re
from test.test_tkinter.support import (AbstractTkTest, tcl_version, get_tk_patchlevel,
simulate_mouse_click, AbstractDefaultRootTest)
from test.test_tkinter.widget_tests import (add_standard_options,
- AbstractWidgetTest, StandardOptionsTests, IntegerSizeTests, PixelSizeTests,
- setUpModule)
+ AbstractWidgetTest, StandardOptionsTests, IntegerSizeTests, PixelSizeTests)
requires('gui')
widget2 = self.create(class_='Foo')
self.assertEqual(widget2['class'], 'Foo')
# XXX
- pass
class WidgetTest(AbstractTkTest, unittest.TestCase):
import unicodedata
import unittest
from test.support import (open_urlresource, requires_resource, script_helper,
- cpython_only, check_disallow_instantiation,
- ResourceDenied)
+ cpython_only, check_disallow_instantiation)
class UnicodeMethodsTest(unittest.TestCase):
import functools
import sys
import types
-import warnings
import unittest
# Test the internal _wmi module on Windows
# This is used by the platform module, and potentially others
-import sys
import unittest
from test.support import import_helper, requires_resource
'test requires loads of disk-space bytes and a long time to run'
)
-import zipfile, os, unittest
+import zipfile, unittest
import time
import sys