| 62 | spool.mkdir() |
| 63 | |
| 64 | class MovingPath: |
| 65 | calls = 0 |
| 66 | |
| 67 | def __fspath__(self) -> str: |
| 68 | self.calls += 1 |
| 69 | if self.calls == 2: |
| 70 | monkeypatch.chdir(spool) |
| 71 | return "gate.db" |
| 72 | |
| 73 | monkeypatch.chdir(state) |
| 74 | with pytest.raises(RuntimeError, match="path changed during singleton construction"): |
no outgoing calls