Commit 7d514fa
committed
Fix test_pybind_implicit_prepare_cache for C-API CI
Two bugs fixed in the test:
1. Add close() method to _FakeResult — QueryResult.close() calls
self._query_result.close() internally; the missing method caused
AttributeError during teardown on C-API CI.
2. Fix _get_pybind_connection monkeypatch to store fake_pybind in
self._py_connection — the bare lambda returned fake_pybind but
never stored it, so Connection.close() never called
fake_pybind_connection.close(), causing
'assert fake_pybind_connection.closed is True' to fail.
The test runs on both pybind and C-API CI jobs. These changes ensure
it passes on C-API without affecting the pybind behavior.1 parent 9e49718 commit 7d514fa
1 file changed
Lines changed: 10 additions & 3 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
14 | 14 | | |
15 | 15 | | |
16 | 16 | | |
| 17 | + | |
| 18 | + | |
| 19 | + | |
17 | 20 | | |
18 | 21 | | |
19 | 22 | | |
| |||
83 | 86 | | |
84 | 87 | | |
85 | 88 | | |
86 | | - | |
87 | | - | |
88 | | - | |
| 89 | + | |
| 90 | + | |
| 91 | + | |
| 92 | + | |
| 93 | + | |
| 94 | + | |
| 95 | + | |
89 | 96 | | |
90 | 97 | | |
91 | 98 | | |
| |||
0 commit comments