Skip to content

Commit

Permalink
adding simplefilter for warning
Browse files Browse the repository at this point in the history
  • Loading branch information
dsullivan7 committed Dec 10, 2014
1 parent b99824f commit 5a019b7
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions sklearn/linear_model/tests/test_sgd.py
Original file line number Diff line number Diff line change
Expand Up @@ -609,6 +609,7 @@ def test_class_weight_warning(self):
"the constructor instead.")
import warnings
with warnings.catch_warnings(record=True) as w:
warnings.simplefilter("always", DeprecationWarning)
clf.fit(X4, Y4, class_weight=1)
assert_true(warning_message == str(w[0].message))
assert_true(issubclass(w[0].category, DeprecationWarning))
Expand Down

0 comments on commit 5a019b7

Please sign in to comment.