Skip to content

Commit 09ea01c

Browse files
committed
tests: no progressbar warnings
1 parent 2b64665 commit 09ea01c

File tree

1 file changed

+9
-0
lines changed

1 file changed

+9
-0
lines changed

Orange/widgets/evaluate/tests/test_owtestlearners.py

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11
# pylint: disable=missing-docstring
22
# pylint: disable=protected-access
33
import unittest
4+
import warnings
45

56
import numpy as np
67
from AnyQt.QtCore import Qt
@@ -382,6 +383,14 @@ def test_scores_cross_validation(self):
382383
OWTestLearners.KFold, 0),
383384
(0.8, 0.5, 0.5, 0.5, 0.5))))
384385

386+
def test_no_pregressbar_warning(self):
387+
data = Table("iris")[::15]
388+
389+
with warnings.catch_warnings(record=True) as w:
390+
self.send_signal(self.widget.Inputs.train_data, data)
391+
self.send_signal(self.widget.Inputs.learner, MajorityLearner(), 0)
392+
assert len(w) == 0
393+
385394

386395
class TestHelpers(unittest.TestCase):
387396
def test_results_one_vs_rest(self):

0 commit comments

Comments
 (0)