summaryrefslogtreecommitdiffstats
path: root/Lib/test/test_importlib/test_util.py
diff options
context:
space:
mode:
authorBrett Cannon <brett@python.org>2021-04-02 19:35:32 (GMT)
committerGitHub <noreply@github.com>2021-04-02 19:35:32 (GMT)
commitf97dc800689ba98783dac8dc51f87f7c6f413ac6 (patch)
treee51ae8f2bf8b3f5434ab4d8b37cd0eef87b62c4e /Lib/test/test_importlib/test_util.py
parentad442a674ca443feec43a88a2d3671784712e550 (diff)
downloadcpython-f97dc800689ba98783dac8dc51f87f7c6f413ac6.zip
cpython-f97dc800689ba98783dac8dc51f87f7c6f413ac6.tar.gz
cpython-f97dc800689ba98783dac8dc51f87f7c6f413ac6.tar.bz2
bpo-43672: raise ImportWarning when calling find_loader() (GH-25119)
Diffstat (limited to 'Lib/test/test_importlib/test_util.py')
-rw-r--r--Lib/test/test_importlib/test_util.py30
1 files changed, 14 insertions, 16 deletions
diff --git a/Lib/test/test_importlib/test_util.py b/Lib/test/test_importlib/test_util.py
index 17de466..1044522 100644
--- a/Lib/test/test_importlib/test_util.py
+++ b/Lib/test/test_importlib/test_util.py
@@ -845,22 +845,20 @@ class MagicNumberTests(unittest.TestCase):
'only applies to candidate or final python release levels'
)
def test_magic_number(self):
- """
- Each python minor release should generally have a MAGIC_NUMBER
- that does not change once the release reaches candidate status.
-
- Once a release reaches candidate status, the value of the constant
- EXPECTED_MAGIC_NUMBER in this test should be changed.
- This test will then check that the actual MAGIC_NUMBER matches
- the expected value for the release.
-
- In exceptional cases, it may be required to change the MAGIC_NUMBER
- for a maintenance release. In this case the change should be
- discussed in python-dev. If a change is required, community
- stakeholders such as OS package maintainers must be notified
- in advance. Such exceptional releases will then require an
- adjustment to this test case.
- """
+ # Each python minor release should generally have a MAGIC_NUMBER
+ # that does not change once the release reaches candidate status.
+
+ # Once a release reaches candidate status, the value of the constant
+ # EXPECTED_MAGIC_NUMBER in this test should be changed.
+ # This test will then check that the actual MAGIC_NUMBER matches
+ # the expected value for the release.
+
+ # In exceptional cases, it may be required to change the MAGIC_NUMBER
+ # for a maintenance release. In this case the change should be
+ # discussed in python-dev. If a change is required, community
+ # stakeholders such as OS package maintainers must be notified
+ # in advance. Such exceptional releases will then require an
+ # adjustment to this test case.
EXPECTED_MAGIC_NUMBER = 3413
actual = int.from_bytes(importlib.util.MAGIC_NUMBER[:2], 'little')