Repository navigation
Commit 532e7b8
docs(assert): explain what an early import costs a test module
The "Assertion introspection details" section said only that pytest
rewrites the modules it discovers, without saying that an import which
beats collection to the module takes that away. The conftest example
further up does exactly the top-level import that bit the reporter of
issue #1929, so note why it is safe there and what makes it unsafe
elsewhere.
Co-Authored-By: Claude Opus 5 (1M context) via Claude Code <noreply@anthropic.com>1 parent 5a88cb7 commit 532e7b8
2 files changed
Lines changed: 19 additions & 0 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
| 1 | + | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
499 | 499 | | |
500 | 500 | | |
501 | 501 | | |
| 502 | + | |
| 503 | + | |
| 504 | + | |
| 505 | + | |
| 506 | + | |
| 507 | + | |
| 508 | + | |
| 509 | + | |
| 510 | + | |
| 511 | + | |
502 | 512 | | |
503 | 513 | | |
504 | 514 | | |
| |||
560 | 570 | | |
561 | 571 | | |
562 | 572 | | |
| 573 | + | |
| 574 | + | |
| 575 | + | |
| 576 | + | |
| 577 | + | |
| 578 | + | |
| 579 | + | |
| 580 | + | |
563 | 581 | | |
564 | 582 | | |
565 | 583 | | |
| |||
0 commit comments