Skip to content

Commit

Permalink
Add time bomb test
Browse files Browse the repository at this point in the history
  • Loading branch information
ajdapretnar authored and PrimozGodec committed Aug 24, 2022
1 parent 3ee3b17 commit 9cbaa4e
Showing 1 changed file with 14 additions and 0 deletions.
14 changes: 14 additions & 0 deletions orangecontrib/text/widgets/tests/test_owcollocations.py
Original file line number Diff line number Diff line change
@@ -1,6 +1,9 @@
import unittest
from distutils.version import LooseVersion

from AnyQt.QtCore import Qt

import Orange
from Orange.widgets.tests.base import WidgetTest

from orangecontrib.text import Corpus
Expand All @@ -16,6 +19,17 @@ def setUp(self) -> None:
# create corpus
self.corpus = Corpus.from_file("deerwester")

def test_table_import_deprecated(self):
"""This test will fail with Orange version > 3.32. This serves as a
reminder to port BarRatioTableModel from core Orange, remove the
redundant code in OWCollocations, and this test."""
if LooseVersion(Orange.__version__) > LooseVersion("3.34.0"):
self.fail(
"BarRatioTableModel should now be available in the released "
"version of Orange. Please import the model from gui.py and "
"remove the redundant code."
)

def test_set_data(self):
self.send_signal(self.widget.Inputs.corpus, self.corpus)
output = self.get_output(self.widget.Outputs.corpus)
Expand Down

0 comments on commit 9cbaa4e

Please sign in to comment.