diff options
author | Eric Snow <ericsnowcurrently@gmail.com> | 2021-09-30 18:38:52 -0600 |
---|---|---|
committer | GitHub <noreply@github.com> | 2021-09-30 18:38:52 -0600 |
commit | 7e5c107541726b90d3f2e6e69ef37180cf58335d (patch) | |
tree | a6f6a4000b9217be777e8f680e0ec9c2f107eaf3 /Python/frozen.c | |
parent | ec4d917a6a68824f1895f75d113add9410283da7 (diff) | |
download | cpython-git-7e5c107541726b90d3f2e6e69ef37180cf58335d.tar.gz |
bpo-45020: Add more test cases for frozen modules. (gh-28664)
I've added a number of test-only modules. Some of those cases are covered by the recently frozen stdlib modules (and some will be once we add encodings back in). However, I figured we'd play it safe by having a set of modules guaranteed to be there during tests.
https://bugs.python.org/issue45020
Diffstat (limited to 'Python/frozen.c')
-rw-r--r-- | Python/frozen.c | 20 |
1 files changed, 18 insertions, 2 deletions
diff --git a/Python/frozen.c b/Python/frozen.c index f9ad07c0b4..b4f7121fda 100644 --- a/Python/frozen.c +++ b/Python/frozen.c @@ -53,6 +53,11 @@ #include "frozen_modules/site.h" #include "frozen_modules/stat.h" #include "frozen_modules/__hello__.h" +#include "frozen_modules/__phello__.h" +#include "frozen_modules/__phello__.ham.h" +#include "frozen_modules/__phello__.ham.eggs.h" +#include "frozen_modules/__phello__.spam.h" +#include "frozen_modules/frozen_only.h" /* End includes */ /* Note that a negative size indicates a package. */ @@ -84,8 +89,19 @@ static const struct _frozen _PyImport_FrozenModules[] = { /* Test module */ {"__hello__", _Py_M____hello__, (int)sizeof(_Py_M____hello__)}, - {"__phello__", _Py_M____hello__, -(int)sizeof(_Py_M____hello__)}, - {"__phello__.spam", _Py_M____hello__, (int)sizeof(_Py_M____hello__)}, + {"__hello_alias__", _Py_M____hello__, (int)sizeof(_Py_M____hello__)}, + {"__phello_alias__", _Py_M____hello__, -(int)sizeof(_Py_M____hello__)}, + {"__phello_alias__.spam", _Py_M____hello__, (int)sizeof(_Py_M____hello__)}, + {"__phello__", _Py_M____phello__, -(int)sizeof(_Py_M____phello__)}, + {"__phello__.__init__", _Py_M____phello__, (int)sizeof(_Py_M____phello__)}, + {"__phello__.ham", _Py_M____phello___ham, -(int)sizeof(_Py_M____phello___ham)}, + {"__phello__.ham.__init__", _Py_M____phello___ham, + (int)sizeof(_Py_M____phello___ham)}, + {"__phello__.ham.eggs", _Py_M____phello___ham_eggs, + (int)sizeof(_Py_M____phello___ham_eggs)}, + {"__phello__.spam", _Py_M____phello___spam, + (int)sizeof(_Py_M____phello___spam)}, + {"__hello_only__", _Py_M__frozen_only, (int)sizeof(_Py_M__frozen_only)}, {0, 0, 0} /* sentinel */ }; |