Skip to content

Commit

Permalink
resolving problems with lint tests (by ashishpatel16)
Browse files Browse the repository at this point in the history
  • Loading branch information
iwan-tee committed Nov 23, 2023
1 parent 8b54d3d commit e7d1b3e
Show file tree
Hide file tree
Showing 3 changed files with 51 additions and 0 deletions.
17 changes: 17 additions & 0 deletions tests/test_LocalClassifierPerLevel.py
Original file line number Diff line number Diff line change
Expand Up @@ -215,3 +215,20 @@ def test_knn():
check_is_fitted(lcpl)
# predictions = lcpl.predict(X)
# assert_array_equal(y, predictions)


def test_fit_multiple_dim_input():
lcpl = LocalClassifierPerLevel()
X = np.random.rand(1, 275, 3)
y = np.array([["a", "b", "c"]])
lcpl.fit(X, y)
check_is_fitted(lcpl)


def test_predict_multiple_dim_input():
lcpl = LocalClassifierPerLevel()
X = np.random.rand(1, 275, 3)
y = np.array([["a", "b", "c"]])
lcpl.fit(X, y)
predictions = lcpl.predict(X)
assert predictions is not None
17 changes: 17 additions & 0 deletions tests/test_LocalClassifierPerNode.py
Original file line number Diff line number Diff line change
Expand Up @@ -276,3 +276,20 @@ def test_knn():
check_is_fitted(lcpn)
# predictions = lcpn.predict(X)
# assert_array_equal(y, predictions)


def test_fit_multiple_dim_input():
lcpn = LocalClassifierPerNode()
X = np.random.rand(1, 275, 3)
y = np.array([["a", "b", "c"]])
lcpn.fit(X, y)
check_is_fitted(lcpn)


def test_predict_multiple_dim_input():
lcpn = LocalClassifierPerNode()
X = np.random.rand(1, 275, 3)
y = np.array([["a", "b", "c"]])
lcpn.fit(X, y)
predictions = lcpn.predict(X)
assert predictions is not None
17 changes: 17 additions & 0 deletions tests/test_LocalClassifierPerParentNode.py
Original file line number Diff line number Diff line change
Expand Up @@ -267,3 +267,20 @@ def test_knn():
check_is_fitted(lcppn)
# predictions = lcppn.predict(X)
# assert_array_equal(y, predictions)


def test_fit_multiple_dim_input():
lcppn = LocalClassifierPerParentNode()
X = np.random.rand(1, 275, 3)
y = np.array([["a", "b", "c"]])
lcppn.fit(X, y)
check_is_fitted(lcppn)


def test_predict_multiple_dim_input():
lcppn = LocalClassifierPerParentNode()
X = np.random.rand(1, 275, 3)
y = np.array([["a", "b", "c"]])
lcppn.fit(X, y)
predictions = lcppn.predict(X)
assert predictions is not None

0 comments on commit e7d1b3e

Please sign in to comment.