Skip to content

bpo-37473: Don't import importlib ASAP in tests #14661

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Jul 14, 2019
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 0 additions & 3 deletions Lib/test/libregrtest/__init__.py
Original file line number Diff line number Diff line change
@@ -1,5 +1,2 @@
# We import importlib *ASAP* in order to test #15386
import importlib

from test.libregrtest.cmdline import _parse_args, RESOURCE_NAMES, ALL_RESOURCES
from test.libregrtest.main import main
3 changes: 0 additions & 3 deletions Lib/test/regrtest.py
Original file line number Diff line number Diff line change
Expand Up @@ -6,9 +6,6 @@
Run this script with -h or --help for documentation.
"""

# We import importlib *ASAP* in order to test #15386
import importlib

import os
import sys
from test.libregrtest import main
Expand Down
16 changes: 7 additions & 9 deletions Lib/test/test_import/__init__.py
Original file line number Diff line number Diff line change
@@ -1,24 +1,22 @@
# We import importlib *ASAP* in order to test #15386
import importlib
import builtins
import contextlib
import errno
import glob
import importlib.util
from importlib._bootstrap_external import _get_sourcefile
import builtins
import marshal
import os
import py_compile
import random
import shutil
import subprocess
import stat
import subprocess
import sys
import textwrap
import threading
import time
import unittest
import unittest.mock as mock
import textwrap
import errno
import contextlib
import glob
from unittest import mock

import test.support
from test.support import (
Expand Down