8000 add test for the RealNotInt type · jeremiedbb/scikit-learn@a6a09b0 · GitHub
[go: up one dir, main page]

Skip to content

Commit a6a09b0

Browse files
committed
add test for the RealNotInt type
1 parent 9a08b8a commit a6a09b0

File tree

1 file changed

+8
-0
lines changed

1 file changed

+8
-0
lines changed

sklearn/utils/tests/test_param_validation.py

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -662,3 +662,11 @@ def test_interval_real_not_int():
662662
constraint = Interval(RealNotInt, 0, 1, closed="both")
663663
assert constraint.is_satisfied_by(1.0)
664664
assert not constraint.is_satisfied_by(1)
665+
666+
667+
def test_real_not_int():
668+
"""Check for the RealNotInt type."""
669+
assert isinstance(1.0, RealNotInt)
670+
assert not isinstance(1, RealNotInt)
671+
assert isinstance(np.float64(1), RealNotInt)
672+
assert not isinstance(np.int64(1), RealNotInt)

0 commit comments

Comments
 (0)
0