Skip to content

Commit

Permalink
Merge pull request #5022 from markotoplak/fixup-table-info
Browse files Browse the repository at this point in the history
Data Table: fix info for an empty table
  • Loading branch information
PrimozGodec committed Oct 9, 2020
2 parents 7e89a72 + 7971349 commit 218c82c
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 1 deletion.
2 changes: 1 addition & 1 deletion Orange/widgets/data/owtable.py
Original file line number Diff line number Diff line change
Expand Up @@ -743,7 +743,7 @@ def desc(n, part):
return f"{n} {part}s"

if slot is None:
return "No data."
return ["No data."]
summary = slot.summary
text = []
if isinstance(summary, ApproxSummary):
Expand Down
6 changes: 6 additions & 0 deletions Orange/widgets/data/tests/test_owtable.py
Original file line number Diff line number Diff line change
Expand Up @@ -169,5 +169,11 @@ def test_summary(self):
self.assertEqual(info._StateInfo__output_summary.brief, "")
self.assertEqual(info._StateInfo__output_summary.details, no_output)

def test_info(self):
info_text = self.widget.info_text
no_input = "No data."
self.assertEqual(info_text.text(), no_input)


if __name__ == "__main__":
unittest.main()

0 comments on commit 218c82c

Please sign in to comment.