Repository navigation
Commit 2c4d4b6
committed
Don't import sphinxdoc.setup under its own name in the tests
pytest before 8.0 treats a module-level `setup` as an xunit setup hook and
calls it once per test with the test module as its argument, so importing
the extension's `setup` into the test module's namespace turned every test
in the file into an error:
AttributeError: module 'tests.config.test_sphinxdoc' has no attribute
'add_object_type'
Only the minimum-versions job caught it, since it pins pytest 7.0 and the
nose-style hooks were removed in pytest 8. Verified against pytest 7.0.1.
Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_019qMpoL5cL6W4qCeCdGm26w1 parent 6b89125 commit 2c4d4b6
1 file changed
Lines changed: 6 additions & 2 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
14 | 14 | | |
15 | 15 | | |
16 | 16 | | |
17 | | - | |
18 | 17 | | |
19 | 18 | | |
20 | 19 | | |
| 20 | + | |
| 21 | + | |
| 22 | + | |
| 23 | + | |
| 24 | + | |
21 | 25 | | |
22 | 26 | | |
23 | 27 | | |
| |||
63 | 67 | | |
64 | 68 | | |
65 | 69 | | |
66 | | - | |
| 70 | + | |
67 | 71 | | |
68 | 72 | | |
69 | 73 | | |
| |||
0 commit comments