Split Up _testsinglephase.c and _testmultiphase.c #124983
Labels
3.14
new features, bugs and security fixes
extension-modules
C modules in the Modules dir
tests
Tests in the Lib/test dir
(low priority)
Modules/_testsinglephase.c
andModules/_testmultiphase.c
both contain the implementations of multiple modules. We should consider splitting up both files, so each contained module has its own file.Here are several reasons why this may be worth doing:
Furthermore, both files were added to test specific import functionality. As far as I can tell2, that never included any need for the multiple-modules-in-one-file approach. However, currently they are the only place where we're testing the feature, regardless of how unintentionally or superficially. gh-124978 targets fixing that lack of explicit testing, including moving away from
_testsinglephase.c
and_testmultiphase.c
(e.g. using the dedicatedModules/_testimportmultiple.c
).All that said, splitting up the files is a fairly low priority task. The status quo isn't ideal but it isn't that bad either.
Here's how I see us taking care of this:
Modules/_testimportmultiple.c
2 (see gh-124978)Modules/_testsinglephase
directory_testsinglephase.c
to its own file (see the devguide)Modules/_testsinglephase.c
Modules/_testmultiphase.c
Footnotes
However, adding it to an existing file is also simpler in how adding a new file involves tweaking the build. See the devguide. ↩
I personally added
Modules/_testsinglephase.c
and @encukou added_testmultiphase.c
. ↩ ↩2The text was updated successfully, but these errors were encountered: