Repository navigation
Add tests for the PyEval_Run family of the C API #117968
Description
Activity
- addedtestsTests in the Lib/test dirTests in the Lib/test dirextension-modulesC modules in the Modules dirC modules in the Modules dir
on Apr 17, 2024 Most of these functions (especially implemented as macros) are thin wrappers around functions with richer interface, so it is not practical to repeat all tests for all functions. We only need to add comprehensive tests for base functions, and simpler tests for derived functions.
Some functions are implemented as macros, but also as real functions. It would be nice to test both implementations (only simple tests are needed).
- added 3 commits that reference this issue
on Apr 17, 2024 The
test_run_fileexflagstest that was added in #117982 sometimes crashes on LTO+PGO buildbots, see for example:- https://buildbot.python.org/all/#/builders/43/builds/5272
- https://buildbot.python.org/all/#/builders/96/builds/7329
Do you want to look into this?
- added a commit that references this issue
on Apr 25, 2024 - added a commit that references this issue
on Apr 25, 2024 I'm still seeing failures; there might be two different issues. See here
The 2 buildbots are now green again.
What's the status of this issue? Do you have enough tests?
I consider that added tests are enough, since other PyRun functions are just aliases to the 2 tested functions.
Functional tests for the
PyEval_Runfamily of the C API lack tests. Discovered in the discussions of PR #116637.PyRun_AnyFile(may be a macro)PyRun_AnyFileEx(may be a macro)PyRun_AnyFileExFlagsPyRun_AnyFileFlags(may be a macro)PyRun_File(may be a macro)PyRun_FileEx(may be a macro)PyRun_FileFlags(may be a macro)PyRun_InteractiveLoop(may be a macro)PyRun_InteractiveLoopFlagsPyRun_InteractiveOne(may be a macro)PyRun_InteractiveOneFlagsPyRun_InteractiveOneObjectPyRun_SimpleFile(may be a macro)PyRun_SimpleFileEx(may be a macro)PyRun_SimpleFileExFlagsPyRun_SimpleString(may be a macro)PyRun_SimpleStringFlagsPyRun_String(may be a macro)Linked PRs