Skip to content

Please update the test suite for gfloat-0.5.2 #363

@mgorny

Description

@mgorny

The test suite currently pins to gfloat < 0.3 which is pretty old. The 0.4* versions work just fine, however there's a small regression with 0.5.2:

========================================================= test session starts =========================================================
platform linux -- Python 3.13.12, pytest-9.0.2, pluggy-1.6.0
rootdir: /tmp/bitstring
configfile: pyproject.toml
plugins: hypothesis-6.151.9
collected 19 items                                                                                                                    

tests/test_fp8.py ..........F.......F                                                                                           [100%]

============================================================== FAILURES ===============================================================
______________________________________ TestConversionToFP8.test_compare_8bit_floats_with_gfloat _______________________________________

self = <tests.test_fp8.TestConversionToFP8 object at 0x7f20c7a19cd0>

    def test_compare_8bit_floats_with_gfloat(self):
>       for fi, lut in [(format_info_p3109(4), p4binary_fmt.lut_binary8_to_float),
                         ^^^^^^^^^^^^^^^^^^^^
                        (format_info_p3109(3), p3binary_fmt.lut_binary8_to_float),
                        (format_info_ocp_e4m3, e4m3mxfp_saturate_fmt.lut_int_to_float),
                        (format_info_ocp_e5m2, e5m2mxfp_saturate_fmt.lut_int_to_float),
                        ]:
E                       TypeError: format_info_p3109() missing 1 required positional argument: 'precision'

tests/test_fp8.py:235: TypeError
_________________________________________________ test_rounding_consistent_to_gfloat __________________________________________________

    def test_rounding_consistent_to_gfloat():
>       for fi, dt in [[format_info_p3109(4), Dtype('p4binary')],
                        ^^^^^^^^^^^^^^^^^^^^
                       [format_info_p3109(3), Dtype('p3binary')]]:
E                      TypeError: format_info_p3109() missing 1 required positional argument: 'precision'

tests/test_fp8.py:325: TypeError
======================================================= short test summary info =======================================================
FAILED tests/test_fp8.py::TestConversionToFP8::test_compare_8bit_floats_with_gfloat - TypeError: format_info_p3109() missing 1 required positional argument: 'precision'
FAILED tests/test_fp8.py::test_rounding_consistent_to_gfloat - TypeError: format_info_p3109() missing 1 required positional argument: 'precision'
==================================================== 2 failed, 17 passed in 0.28s =====================================================

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions