Skip to content

Commit

Permalink
Fix test style
Browse files Browse the repository at this point in the history
  • Loading branch information
fchollet committed Jul 6, 2017
1 parent 1dc67f3 commit 4392d12
Showing 1 changed file with 3 additions and 5 deletions.
8 changes: 3 additions & 5 deletions tests/test_loss_weighting.py
Original file line number Diff line number Diff line change
Expand Up @@ -156,11 +156,9 @@ def test_class_weight_wrong_classes():
(x_train, y_train), (x_test, y_test), (sample_weight, class_weight, test_ids) = _get_test_data()

del class_weight[1]
try:
model.fit(x_train, y_train, epochs=0, verbose=0, class_weight=class_weight)
assert False
except ValueError:
pass # expected behavior is to raise a ValueError with a suitable message
with pytest.raises(ValueError):
model.fit(x_train, y_train,
epochs=0, verbose=0, class_weight=class_weight)


if __name__ == '__main__':
Expand Down

0 comments on commit 4392d12

Please sign in to comment.