It is not guaranteed that DontReadFromInput's read is called.
(pytester: Pytester)
| 1279 | |
| 1280 | |
| 1281 | def test_raises_bdbquit_with_eoferror(pytester: Pytester) -> None: |
| 1282 | """It is not guaranteed that DontReadFromInput's read is called.""" |
| 1283 | |
| 1284 | p1 = pytester.makepyfile( |
| 1285 | """ |
| 1286 | def input_without_read(*args, **kwargs): |
| 1287 | raise EOFError() |
| 1288 | |
| 1289 | def test(monkeypatch): |
| 1290 | import builtins |
| 1291 | monkeypatch.setattr(builtins, "input", input_without_read) |
| 1292 | __import__('pdb').set_trace() |
| 1293 | """ |
| 1294 | ) |
| 1295 | result = pytester.runpytest(str(p1)) |
| 1296 | result.stdout.fnmatch_lines(["E *BdbQuit", "*= 1 failed in*"]) |
| 1297 | assert result.ret == 1 |
| 1298 | |
| 1299 | |
| 1300 | def test_pdb_wrapper_class_is_reused(pytester: Pytester) -> None: |
nothing calls this directly
no test coverage detected