From 3093a1d96ecebf5405e055e6a955f6d22533f72f Mon Sep 17 00:00:00 2001 From: Marko Toplak Date: Mon, 4 May 2020 11:51:26 +0200 Subject: [PATCH] Roundtrip writing tests: use the exact same Writer/Reader Readers support multiple possibly overlapping extensions, so saving with one Writer/Reader and opening just by the file name could possibly fail. --- Orange/widgets/data/tests/test_owsave.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/Orange/widgets/data/tests/test_owsave.py b/Orange/widgets/data/tests/test_owsave.py index 14aff62198d..2047281835b 100644 --- a/Orange/widgets/data/tests/test_owsave.py +++ b/Orange/widgets/data/tests/test_owsave.py @@ -404,13 +404,13 @@ def test_save_uncompressed(self): self.send_signal(widget.Inputs.data, self.iris) widget.save_file_as() if hasattr(writer, "read"): - self.assertEqual(len(Table(filename)), 150) + self.assertEqual(len(writer(filename).read()), 150) if writer.SUPPORT_SPARSE_DATA: self.send_signal(widget.Inputs.data, spiris) widget.save_file() if hasattr(writer, "read"): - self.assertEqual(len(Table(filename)), 150) + self.assertEqual(len(writer(filename).read()), 150) @unittest.skipUnless(sys.platform == "linux", "Tests for dialog on Linux")