Skip to content

Commit dfcc35c

Browse files
authored
Merge pull request #52 from rq1995/master
Improved test coverage of mallow to 100%
2 parents 3e630e9 + 202eb89 commit dfcc35c

File tree

1 file changed

+8
-0
lines changed

1 file changed

+8
-0
lines changed

tests/test_mallows.py

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
11
import os
22
import sys
3+
import numpy as np
34
import pytest
45

56
sys.path.insert(0, os.path.abspath("."))
@@ -147,3 +148,10 @@ def test_type_ypred1(self):
147148
[0, 6, 0, 0],
148149
[0, 0, 7, 0],
149150
[0, 0, 0, 8]],[1,2,3,4],[5,6,7,8],3,2)
151+
152+
def test_type_ypred2(self):
153+
"""
154+
test if y_pred is a vector or array-like type including numbers, if not yield error
155+
"""
156+
with pytest.raises(TypeError):
157+
mallow([1, 2, 3, 4],"1234",[5,6,7,8], 5, 3)

0 commit comments

Comments
 (0)