Skip to content

Commit

Permalink
Merge pull request #52 from rq1995/master
Browse files Browse the repository at this point in the history
Improved test coverage of mallow to 100%
  • Loading branch information
simrnsethi authored Mar 18, 2018
2 parents 3e630e9 + 202eb89 commit dfcc35c
Showing 1 changed file with 8 additions and 0 deletions.
8 changes: 8 additions & 0 deletions tests/test_mallows.py
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
import os
import sys
import numpy as np
import pytest

sys.path.insert(0, os.path.abspath("."))
Expand Down Expand Up @@ -147,3 +148,10 @@ def test_type_ypred1(self):
[0, 6, 0, 0],
[0, 0, 7, 0],
[0, 0, 0, 8]],[1,2,3,4],[5,6,7,8],3,2)

def test_type_ypred2(self):
"""
test if y_pred is a vector or array-like type including numbers, if not yield error
"""
with pytest.raises(TypeError):
mallow([1, 2, 3, 4],"1234",[5,6,7,8], 5, 3)

0 comments on commit dfcc35c

Please sign in to comment.