Commit 20e73a2
committed
Fix side-effect-in-assert in 036 trace.id check
CodeQL py/side-effect-in-assert flagged the expected_metadata.pop()
inside the assert: under python -O the assertion (and its pop) is
stripped, leaving the invocation_id key in expected_metadata for the
later _assert_metadata_subset to wrongly check. Bind the pop to a local
before the assert, and include the expected value in the failure message.1 parent 082f0b6 commit 20e73a2
1 file changed
Lines changed: 3 additions & 2 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1270 | 1270 | | |
1271 | 1271 | | |
1272 | 1272 | | |
1273 | | - | |
1274 | | - | |
| 1273 | + | |
| 1274 | + | |
| 1275 | + | |
1275 | 1276 | | |
1276 | 1277 | | |
1277 | 1278 | | |
| |||
0 commit comments