Skip to content

Commit

Permalink
OWImportDocuments: add unittests
Browse files Browse the repository at this point in the history
  • Loading branch information
PrimozGodec committed Aug 20, 2020
1 parent 16becff commit c0ce6fd
Showing 1 changed file with 12 additions and 0 deletions.
12 changes: 12 additions & 0 deletions orangecontrib/text/widgets/tests/test_owimportdocuments.py
Original file line number Diff line number Diff line change
Expand Up @@ -34,6 +34,7 @@ def test_output(self):
],
sorted([x.strip() for x in texts.tolist()]),
)
self.assertEqual("content", output.text_features[0].name)

def test_could_not_be_read_warning(self):
"""
Expand All @@ -49,6 +50,17 @@ def test_could_not_be_read_warning(self):
def test_send_report(self):
self.widget.send_report()

def test_info_box(self):
self.assertEqual(
"4 documents, 1 skipped", self.widget.info_area.text()
)

# empty widget
self.widget: OWImportDocuments = self.create_widget(OWImportDocuments)
self.assertEqual(
"No document set selected", self.widget.info_area.text()
)


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

0 comments on commit c0ce6fd

Please sign in to comment.