cpython/Lib/test/test_importlib
Eric Appelt d6d344d833 bpo-29514: Check magic number for bugfix release (#54)
* bpo-29514: Check magic number for micro release

Add a dict importlib.util.EXPECTED_MAGIC_NUMBERS which
details the initial and expected pyc magic number for
each minor release. This gives a mechanism for users to
check if the magic number has changed within a release and
for a test to ensure procedure is followed if a change is
necessary.

Add a test to check the current MAGIC_NUMBER against the
expected number for the release if the current release is
at candidate or final level. On test failure, describe to
the developer the procedure for changing the magic number.

* Simplify magic number release test

Simplify the magic number release test by removing
EXPECTED_MAGIC_NUMBERS table and making the expected
magic number self-contained within the test.

BPO: 29514

* Improve magic number test execution and message

Improve the execution of the magic number test by
using skipUnless for alpha and beta releases, and
directly inheriting from unittest.TestCase rather than
using the machinery for the other tests. Also improve
the error message to explain the reason for caution in
changing the magic number.

BPO: 29514
2017-04-17 11:35:43 -07:00
..
builtin Issue #15836: assertRaises(), assertRaisesRegex(), assertWarns() and 2015-05-21 20:15:40 +03:00
extension Merge #27782 fix from 3.5 2016-08-21 17:43:58 +10:00
frozen Issue #23277: Remove unused sys and os imports 2016-04-24 07:31:42 +03:00
import_ Issue #15767: Use ModuleNotFoundError. 2016-09-07 16:56:15 -07:00
namespace_pkgs
source Merge for #27083 2016-07-16 10:45:16 -07:00
__init__.py
__main__.py
abc.py Remove unused imports. 2016-12-16 20:00:15 +02:00
test_abc.py bpo-29576: add explicit deprecation for importlib.abc.find_loader() and find_module() (GH-32) 2017-02-15 18:00:32 -08:00
test_api.py Issue #21099: Switch applicable importlib tests to use PEP 451 API. 2016-05-10 16:21:03 -06:00
test_lazy.py Issue #26186: Remove the restriction that built-in and extension 2016-06-25 10:58:17 -07:00
test_locks.py Issue #26940: Fix test_importlib that hangs on the Android armv7 qemu emulator. 2016-12-08 11:26:18 +01:00
test_namespace_pkgs.py Fixes #19711: Add tests for reloading namespace packages. 2016-05-10 15:29:05 -06:00
test_spec.py Issue #26667: Add path-like object support to importlib.util. 2016-09-07 18:39:18 -07:00
test_util.py bpo-29514: Check magic number for bugfix release (#54) 2017-04-17 11:35:43 -07:00
test_windows.py Issue #25985: sys.version_info is now used instead of sys.version 2016-02-11 13:10:36 +02:00
util.py Merge for #27083 2016-07-16 10:45:16 -07:00