Skip to content

Commit

Permalink
Make test work with Python 3.8.
Browse files Browse the repository at this point in the history
  • Loading branch information
alexaryn committed Oct 21, 2024
1 parent a905bac commit dafbafc
Showing 1 changed file with 5 additions and 5 deletions.
10 changes: 5 additions & 5 deletions tests/test_writer.py
Original file line number Diff line number Diff line change
Expand Up @@ -2504,8 +2504,8 @@ def test_stream_not_closed():

def test_auto_write():
"""Another test for #2905"""
with NamedTemporaryFile(suffix=".pdf", delete_on_close=False) as tmp:
tmp.close()
with PdfWriter(tmp.name) as writer:
writer.add_blank_page(100, 100)
assert Path(tmp.name).stat().st_size > 0
target = Path(_get_write_target(str))
with PdfWriter(target) as writer:
writer.add_blank_page(100, 100)
assert target.stat().st_size > 0
target.unlink()

0 comments on commit dafbafc

Please sign in to comment.