diff --git a/python/tests/test_write_and_read.py b/python/tests/test_write_and_read.py index d9a492b62..6e3a45c63 100644 --- a/python/tests/test_write_and_read.py +++ b/python/tests/test_write_and_read.py @@ -1109,3 +1109,63 @@ def test_tree_all_datatype_query_to_dataframe_variants(): if __name__ == "__main__": os.chdir(os.path.dirname(os.path.abspath(__file__))) pytest.main(["test_write_and_read.py::test_row_record_write_and_read", "-s", "-v"]) + + +def test_float_nan_inf_write_and_read(): + import struct + + file_path = "float_nan_inf_write_and_read.tsfile" + specials = [float("nan"), float("inf"), float("-inf")] + expected_bits = [0x7FC00000, 0x7F800000, 0xFF800000] + + def f32_bits(value): + return struct.unpack("