()
| 581 | |
| 582 | |
| 583 | def test_numpy_bool(): |
| 584 | np = pytest.importorskip("numpy") |
| 585 | |
| 586 | convert, noconvert = m.bool_passthrough, m.bool_passthrough_noconvert |
| 587 | |
| 588 | def cant_convert(v): |
| 589 | pytest.raises(TypeError, convert, v) |
| 590 | |
| 591 | # np.bool_ is not considered implicit |
| 592 | assert convert(np.bool_(True)) is True |
| 593 | assert convert(np.bool_(False)) is False |
| 594 | assert noconvert(np.bool_(True)) is True |
| 595 | assert noconvert(np.bool_(False)) is False |
| 596 | cant_convert(np.zeros(2, dtype="int")) |
| 597 | |
| 598 | |
| 599 | def test_int_long(): |
nothing calls this directly
no test coverage detected