Skip to content

test_hexadecimal_with_libc_bulk() fails on ppc64el and riscv64 #1047

@skirpichev

Description

@skirpichev

See https://ci.debian.net/packages/m/mpmath/testing/ppc64el/68920650/ and https://ci.debian.net/packages/m/mpmath/testing/riscv64/68921013/

3438s =================================== FAILURES ===================================
3438s _______________________ test_hexadecimal_with_libc_bulk ________________________
3438s 
3438s     @pytest.mark.skipif(libc is None, reason='requires libc')
3438s >   @settings(max_examples=10000)
3438s                    ^^^
3438s 
3438s mpmath/tests/test_format.py:872: 
3438s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 
3438s 
3438s x = 1.0, p = 0
3438s 
3438s     @pytest.mark.skipif(libc is None, reason='requires libc')
3438s     @settings(max_examples=10000)
3438s     @given(st.floats(allow_nan=False, allow_infinity=False,
3438s                      allow_subnormal=False),
3438s            st.integers(min_value=0, max_value=15))
3438s     def test_hexadecimal_with_libc_bulk(x, p):
3438s         fmt = '.' + str(p) + 'a'
3438s         x_hex = float_print(x, p)
3438s         m_hex = format(mp.mpf(x), fmt)
3438s >       assert mp.mpf(m_hex) == mp.mpf(x_hex)
3438s E       AssertionError: assert mpf('1.0') == mpf('0.0')
3438s E        +  where mpf('1.0') = <class 'mpmath.ctx_mp_python.mpf'>('0x1p+0')
3438s E        +    where <class 'mpmath.ctx_mp_python.mpf'> = <mpmath.ctx_mp.MPContext object at 0x7fffbc080440>.mpf
3438s E        +  and   mpf('0.0') = <class 'mpmath.ctx_mp_python.mpf'>('0x0p-1022')
3438s E        +    where <class 'mpmath.ctx_mp_python.mpf'> = <mpmath.ctx_mp.MPContext object at 0x7fffbc080440>.mpf
3438s E       Falsifying example: test_hexadecimal_with_libc_bulk(
3438s E           x=1.0,
3438s E           p=0,
3438s E       )
3438s 
3438s mpmath/tests/test_format.py:880: AssertionError
3438s =============================== warnings summary ===============================

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugan unexpected problem or unintended behaviortesting

    Type

    No type

    Projects

    No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions