Skip to content

Commit

Permalink
tests: no progressbar warnings
Browse files Browse the repository at this point in the history
  • Loading branch information
robertcv committed Sep 27, 2019
1 parent 2b64665 commit dfb7b2d
Showing 1 changed file with 9 additions and 0 deletions.
9 changes: 9 additions & 0 deletions Orange/widgets/evaluate/tests/test_owtestlearners.py
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
# pylint: disable=missing-docstring
# pylint: disable=protected-access
import unittest
import warnings

import numpy as np
from AnyQt.QtCore import Qt
Expand Down Expand Up @@ -382,6 +383,14 @@ def test_scores_cross_validation(self):
OWTestLearners.KFold, 0),
(0.8, 0.5, 0.5, 0.5, 0.5))))

def test_no_pregressbar_warning(self):
data = Table("iris")[::15]

with warnings.catch_warnings(record=True) as w:
self.send_signal(self.widget.Inputs.train_data, data)
self.send_signal(self.widget.Inputs.learner, MajorityLearner(), 0)
assert not w


class TestHelpers(unittest.TestCase):
def test_results_one_vs_rest(self):
Expand Down

0 comments on commit dfb7b2d

Please sign in to comment.