Skip to content

Commit 24ffe70

Browse files
authored
bpo-40334: Rewrite test_c_parser to avoid memory leaks (GH-19694)
Previously every test was building an extension module and loading it into sys.modules. The tearDown function was thus not able to clean up correctly, resulting in memory leaks. With this commit, every test function now builds the extension module and runs the actual test code in a new process (using assert_python_ok), so that sys.modules stays intact and no memory gets leaked.
1 parent e6f8abd commit 24ffe70

3 files changed

Lines changed: 146 additions & 83 deletions

File tree

0 commit comments

Comments
 (0)