Commit c28bbc8
Migrate fork-guard tests to pid-cache patch and apply asyncio mark per-method
Two cycle-21 follow-ups in the dbapi tests:
- Fork-guard tests (sync + async) patched
``dqlitedbapi.connection.os.getpid`` and
``dqlitedbapi.aio.connection.os.getpid``. Cycle 21 moved every
hot-path pid check to read ``dqliteclient.connection._current_pid``
via the register_at_fork-refreshed module cache. The
``patch("...os.getpid", ...)`` patches were dead code; the tests
passed only because they also mutated ``_creator_pid`` directly.
Migrate to patching the cache.
- ``TestAsyncTpcStubs`` carried a class-level
``@pytest.mark.asyncio`` decorator but ``test_xid`` is a
synchronous method. Under pytest-asyncio's strict mode this can
fail collection. Move the mark from the class to each async
method individually, matching the sibling
``TestAsyncStdlibParityStubs`` class's per-method pattern.
Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>1 parent 3108289 commit c28bbc8
3 files changed
Lines changed: 9 additions & 5 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
35 | 35 | | |
36 | 36 | | |
37 | 37 | | |
38 | | - | |
| 38 | + | |
39 | 39 | | |
40 | 40 | | |
41 | 41 | | |
| |||
56 | 56 | | |
57 | 57 | | |
58 | 58 | | |
59 | | - | |
| 59 | + | |
60 | 60 | | |
61 | 61 | | |
62 | 62 | | |
| |||
82 | 82 | | |
83 | 83 | | |
84 | 84 | | |
85 | | - | |
| 85 | + | |
86 | 86 | | |
87 | 87 | | |
88 | 88 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
95 | 95 | | |
96 | 96 | | |
97 | 97 | | |
98 | | - | |
| 98 | + | |
99 | 99 | | |
100 | 100 | | |
101 | 101 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
103 | 103 | | |
104 | 104 | | |
105 | 105 | | |
106 | | - | |
107 | 106 | | |
| 107 | + | |
108 | 108 | | |
109 | 109 | | |
110 | 110 | | |
111 | 111 | | |
| 112 | + | |
112 | 113 | | |
113 | 114 | | |
114 | 115 | | |
115 | 116 | | |
| 117 | + | |
116 | 118 | | |
117 | 119 | | |
118 | 120 | | |
119 | 121 | | |
| 122 | + | |
120 | 123 | | |
121 | 124 | | |
122 | 125 | | |
123 | 126 | | |
| 127 | + | |
124 | 128 | | |
125 | 129 | | |
126 | 130 | | |
| |||
0 commit comments