From 0e0c6072da7569071ee3cbff8be67cfccbb88c2b Mon Sep 17 00:00:00 2001 From: Julien Cristau Date: Thu, 1 Sep 2022 12:44:36 +0200 Subject: [PATCH] tests: fix one more "unclosed file" issue --- tests/test_writer.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/tests/test_writer.py b/tests/test_writer.py index a1961a1..fd4eec4 100644 --- a/tests/test_writer.py +++ b/tests/test_writer.py @@ -278,8 +278,8 @@ def test_add_signature(tmpdir, mar_cue, test_keys): assert m1.verify(public_key) # Assert file contents are the same - with dest_mar.open('rb') as f, MarReader(f) as m1: - with MarReader(mar_cue.open('rb')) as m: + with dest_mar.open('rb') as f1, MarReader(f1) as m1: + with mar_cue.open('rb') as f, MarReader(f) as m: offset_delta = m1.mardata.data_offset - m.mardata.data_offset for (e, e1) in zip(m.mardata.index.entries, m1.mardata.index.entries): assert e.name == e1.name