Commit 27276b6
fix: Prefix bootstrap file to prevent pytest reentrance (#2230)
Pytest will, by default, discover tests in files named `test_*.py`. The
existing behaviour of the bootstrap setup is to create a file named e.g.
`test_foo_stage2_bootstrap.py` for a target named `test_foo`. This
causes pytest to reenter, leading to a crash.
To fix, prepend the generated stage2 file with an underscore so that
pytest doesn't match it.
---------
Co-authored-by: Richard Levasseur <[email protected]>1 parent 654b4d5 commit 27276b6
2 files changed
+5
-1
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
57 | 57 | | |
58 | 58 | | |
59 | 59 | | |
| 60 | + | |
| 61 | + | |
60 | 62 | | |
61 | 63 | | |
62 | 64 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
330 | 330 | | |
331 | 331 | | |
332 | 332 | | |
333 | | - | |
| 333 | + | |
| 334 | + | |
| 335 | + | |
334 | 336 | | |
335 | 337 | | |
336 | 338 | | |
| |||
0 commit comments