From e390d89f1faaec3abcfd7d617b4bd084eb246b86 Mon Sep 17 00:00:00 2001 From: Tzu-Wei Huang Date: Sun, 21 Nov 2021 02:38:04 +0800 Subject: [PATCH] add test case to reproduce #639 --- tests/test_writer.py | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/tests/test_writer.py b/tests/test_writer.py index 992bb761..cf1ed537 100644 --- a/tests/test_writer.py +++ b/tests/test_writer.py @@ -71,6 +71,12 @@ def test_flush(self): def test_auto_close(self): pass + def test_reuse_writer_after_closed(self): + w = SummaryWriter() + w.close() + w.add_text("reuse writer", "dont reuse without creating a new writer", 0) + + def test_writer(self): with SummaryWriter() as writer: sample_rate = 44100