Skip to content

Commit 8a5dc0b

Browse files
committed
CN2 tests: Add attribute to the model used for testing
1 parent eb4551c commit 8a5dc0b

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed

Orange/widgets/visualize/tests/test_owruleviewer.py

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,9 @@ def setUp(self):
1414
self.titanic = Table('titanic')
1515
self.learner = CN2Learner()
1616
self.classifier = self.learner(self.titanic)
17+
# CN2Learner does not add `instances` attribute to the model, but
18+
# the Rules widget does. We simulate the model we get from the widget.
19+
self.classifier.instances = self.titanic
1720
self.widget = self.create_widget(OWRuleViewer)
1821

1922
def test_set_data(self):

0 commit comments

Comments
 (0)