Commit e40eca0
committed
fix: use safe module access in ensureRootLogger for parallel test execution
In parallel test execution with stitched builds, sys.modules[__name__] can
raise KeyError if the module isn't yet registered in sys.modules due to
race conditions. Use sys.modules.get(__name__) instead with a None check,
following the same pattern used elsewhere in the codebase (line 734).
This fixes intermittent test failures in ensureRootLogger when tests run
in parallel with pytest -n auto in stitched mode.1 parent 2323bb8 commit e40eca0
1 file changed
+3
-2
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
950 | 950 | | |
951 | 951 | | |
952 | 952 | | |
953 | | - | |
954 | | - | |
| 953 | + | |
| 954 | + | |
| 955 | + | |
955 | 956 | | |
956 | 957 | | |
957 | 958 | | |
| |||
0 commit comments