()
| 366 | |
| 367 | |
| 368 | def test_python_file_closing(): |
| 369 | bio = BytesIO() |
| 370 | pf = pa.PythonFile(bio) |
| 371 | wr = weakref.ref(pf) |
| 372 | del pf |
| 373 | assert wr() is None # object was destroyed |
| 374 | assert not bio.closed |
| 375 | pf = pa.PythonFile(bio) |
| 376 | pf.close() |
| 377 | assert bio.closed |
| 378 | |
| 379 | |
| 380 | # ---------------------------------------------------------------------- |
nothing calls this directly
no test coverage detected