()
| 80 | |
| 81 | |
| 82 | def test_encode_scalar_bool(): |
| 83 | codec = ScalarCodec(BooleanType()) |
| 84 | field = UnischemaField(name='field_bool', numpy_dtype=np.bool, shape=(), codec=codec, nullable=False) |
| 85 | |
| 86 | encoded = codec.encode(field, np.bool_(True)) |
| 87 | assert isinstance(codec.encode(field, encoded), bool) |
| 88 | assert encoded |
| 89 | |
| 90 | encoded = codec.encode(field, np.bool_(False)) |
| 91 | assert not encoded |
| 92 | |
| 93 | |
| 94 | def test_encode_scalar_int(): |
nothing calls this directly
no test coverage detected
searching dependent graphs…