Skip to content

Commit

Permalink
Roundtrip writing tests: use the exact same Writer/Reader
Browse files Browse the repository at this point in the history
Readers support multiple possibly overlapping extensions, so saving with
one Writer/Reader and opening just by the file name could possibly
fail.
  • Loading branch information
markotoplak committed May 4, 2020
1 parent e176426 commit 3093a1d
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions Orange/widgets/data/tests/test_owsave.py
Original file line number Diff line number Diff line change
Expand Up @@ -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")
Expand Down

0 comments on commit 3093a1d

Please sign in to comment.