Skip to content
Snippets Groups Projects
Commit 19732c8d authored by Pierre-Yves David's avatar Pierre-Yves David Committed by vlorentz
Browse files

test: properly scope file write in a test

This test work with cpython because as we do not assign the open file to
a variable, the reference counting garbage collect it right after the
`write` call. Deleting the file object mean the write is flushed.

On an interpreter without reference counting, as pypy, the file object might be
garbaged collected too late, breaking the test.

So we give the file object a clear life cycle.
parent 34113bc0
No related branches found
No related tags found
No related merge requests found
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment