summaryrefslogtreecommitdiff
path: root/tests
diff options
context:
space:
mode:
authorMicah Lee <micah@micahflee.com>2020-08-21 19:21:06 -0400
committerMicah Lee <micah@micahflee.com>2020-08-21 19:21:06 -0400
commit15f7d196708f71c862298999cb61e16333ce8c02 (patch)
treeb2b5a92e8276113646286aec56ea041132c8df6d /tests
parent283554a655da9ae9859ccc25903ede90a215bce2 (diff)
downloadonionshare-15f7d196708f71c862298999cb61e16333ce8c02.tar.gz
onionshare-15f7d196708f71c862298999cb61e16333ce8c02.zip
Fix one more tempfile Windows test bug
Diffstat (limited to 'tests')
-rw-r--r--tests/test_gui_share.py4
1 files changed, 3 insertions, 1 deletions
diff --git a/tests/test_gui_share.py b/tests/test_gui_share.py
index 414472c0..441fc03a 100644
--- a/tests/test_gui_share.py
+++ b/tests/test_gui_share.py
@@ -135,11 +135,13 @@ class TestShare(GuiBaseTest):
),
)
- tmp_file = tempfile.NamedTemporaryFile("wb")
+ tmp_file = tempfile.NamedTemporaryFile("wb", delete=False)
tmp_file.write(r.content)
+ tmp_file.close()
with open(tmp_file.name, "r") as f:
self.assertEqual("onionshare", f.read())
+ os.remove(tmp_file.name)
QtTest.QTest.qWait(500)