def test_dump_float32_raises_mismatch_error_on_mismatch(self): with pytest.raises(BinarySizeMismatch, match=_MISMATCH_DUMP_REGEX): dump_float32(3.4e39) with pytest.raises(BinarySizeMismatch, match=_MISMATCH_DUMP_REGEX): dump_float32(-3.4e39)
def test_dump_float32_raises_type_error_on_invalid_type(self): with pytest.raises(TypeError, match=_TYPE_ERROR_DUMP_REGEX): dump_float32(_INVALID)
def test_dump_float32_raises_type_error_on_none(self): with pytest.raises(TypeError, match=_TYPE_ERROR_DUMP_REGEX): dump_float32(None)
def test_dump_float32_big(self): assert dump_float32(_FLOAT32, ByteOrder.BIG) == _FLOAT32_BYTES_BIG
def test_dump_float32_little(self): assert dump_float32( _FLOAT32, ByteOrder.LITTLE) == _FLOAT32_BYTES_LITTLE
def test_dump_float32(self): assert dump_float32(_FLOAT32) == _FLOAT32_BYTES