MCPcopy Create free account
hub / github.com/apache/arrow / test_python_file_closing

Function test_python_file_closing

python/pyarrow/tests/test_io.py:368–377  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

366
367
368def 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# ----------------------------------------------------------------------

Callers

nothing calls this directly

Calls 2

PythonFileMethod · 0.80
closeMethod · 0.45

Tested by

no test coverage detected