MCPcopy Create free account
hub / github.com/apache/fory / test_bool_field_coercion_numpy_bool

Function test_bool_field_coercion_numpy_bool

python/pyfory/tests/test_struct.py:780–788  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

778
779
780def test_bool_field_coercion_numpy_bool():
781 np = pytest.importorskip("numpy")
782 fory = Fory(xlang=False, ref=True, strict=False, compatible=False)
783
784 result_true = ser_de(fory, BoolCoercionObject(np.bool_(True)))
785 assert result_true.b is True
786
787 result_false = ser_de(fory, BoolCoercionObject(np.bool_(False)))
788 assert result_false.b is False
789
790
791@pytest.mark.parametrize(

Callers

nothing calls this directly

Calls 3

ForyClass · 0.90
BoolCoercionObjectClass · 0.85
ser_deFunction · 0.70

Tested by

no test coverage detected