diff options
author | Micah Lee <micah@micahflee.com> | 2020-08-21 19:21:06 -0400 |
---|---|---|
committer | Micah Lee <micah@micahflee.com> | 2020-08-21 19:21:06 -0400 |
commit | 15f7d196708f71c862298999cb61e16333ce8c02 (patch) | |
tree | b2b5a92e8276113646286aec56ea041132c8df6d /tests | |
parent | 283554a655da9ae9859ccc25903ede90a215bce2 (diff) | |
download | onionshare-15f7d196708f71c862298999cb61e16333ce8c02.tar.gz onionshare-15f7d196708f71c862298999cb61e16333ce8c02.zip |
Fix one more tempfile Windows test bug
Diffstat (limited to 'tests')
-rw-r--r-- | tests/test_gui_share.py | 4 |
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) |