Commit d8efa97
committed
fix(tests): handle __STITCHED__ in package module for runtime mode detection
Tests were failing in stitched mode because after serger runs, the
apathetic_utils package module in sys.modules retains __STITCHED__ and
__STANDALONE__ attributes. The detect_runtime_mode function checks for
these in the package module, but the tests were only cleaning up the
function's globals and __main__ module.
Updated three failing tests to also save, remove, and restore
__STITCHED__ and __STANDALONE__ from the package module in sys.modules:
- test_detect_runtime_mode_zipapp_missing_file_attribute
- test_detect_runtime_mode_package
- test_detect_runtime_mode_package_missing_main1 parent 3d559fa commit d8efa97
File tree
3 files changed
+166
-105
lines changed- tests/30_independant
3 files changed
+166
-105
lines changed
0 commit comments