Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Possible Solutions to Issues 26216, 25677, and 25589 #26276

Closed
wants to merge 16 commits into from

custom test cases for issue 25677

bcc9f36
Select commit
Loading
Failed to load commit list.
Closed

Possible Solutions to Issues 26216, 25677, and 25589 #26276

custom test cases for issue 25677
bcc9f36
Select commit
Loading
Failed to load commit list.
Cirrus CI / linux_aarch64_test failed Apr 23, 2024 in 15m 50s

Task Summary

Instruction test failed in 04:40

Details

✅ 00:58 clone
✅ 00:00 ccache
✅ 01:41 prepare_env
✅ 06:41 build
❌ 04:40 test

a          = masked_array(
  data=[[1, 2, 3],
        [4, --, 6]],
  mask=[[False, False, False],
        [False,  True, False]],
  fill_value=np.int64(127),
  dtype=int8)
self       = <numpy.ma.tests.test_core.TestMaskedArray object at 0xe26f1f5a8a00>

numpy/ma/tests/test_core.py:558: 
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 

actual = 'masked_array(\n  data=[[1, 2, 3],\n        [4, --, 6]],\n  mask=[[False, False, False],\n        [False,  True, False]],\n  fill_value=np.int64(127),\n  dtype=int8)'
desired = 'masked_array(\n  data=[[1, 2, 3],\n        [4, --, 6]],\n  mask=[[False, False, False],\n        [False,  True, False]],\n  fill_value=np.int64(999999),\n  dtype=int8)'
err_msg = ''

    def assert_equal(actual, desired, err_msg=''):
        """
        Asserts that two items are equal.
    
        """
        # Case #1: dictionary .....
        if isinstance(desired, dict):
            if not isinstance(actual, dict):
                raise AssertionError(repr(type(actual)))
            assert_equal(len(actual), len(desired), err_msg)
            for k, i in desired.items():
                if k not in actual:
                    raise AssertionError(f"{k} not in {actual}")
                assert_equal(actual[k], desired[k], f'key={k!r}\n{err_msg}')
            return
        # Case #2: lists .....
        if isinstance(desired, (list, tuple)) and isinstance(actual, (list, tuple)):
            return _assert_equal_on_sequences(actual, desired, err_msg='')
        if not (isinstance(actual, ndarray) or isinstance(desired, ndarray)):
            msg = build_err_msg([actual, desired], err_msg,)
            if not desired == actual:
>               raise AssertionError(msg)
E               AssertionError: 
E               Items are not equal:
E                ACTUAL: 'masked_array(\n  data=[[1, 2, 3],\n        [4, --, 6]],\n  mask=[[False, False, False],\n        [False,  True, False]],\n  fill_value=np.int64(127),\n  dtype=int8)'
E                DESIRED: 'masked_array(\n  data=[[1, 2, 3],\n        [4, --, 6]],\n  mask=[[False, False, False],\n        [False,  True, False]],\n  fill_value=np.int64(999999),\n  dtype=int8)'

actual     = 'masked_array(\n  data=[[1, 2, 3],\n        [4, --, 6]],\n  mask=[[False, False, False],\n        [False,  True, False]],\n  fill_value=np.int64(127),\n  dtype=int8)'
desired    = 'masked_array(\n  data=[[1, 2, 3],\n        [4, --, 6]],\n  mask=[[False, False, False],\n        [False,  True, False]],\n  fill_value=np.int64(999999),\n  dtype=int8)'
err_msg    = ''
msg        = "\nItems are not equal:\n ACTUAL: 'masked_array(\\n  data=[[1, 2, 3],\\n        [4, --, 6]],\\n  mask=[[False, False, ...,\\n  mask=[[False, False, False],\\n        [False,  True, False]],\\n  fill_value=np.int64(999999),\\n  dtype=int8)'"

numpy/ma/testutils.py:133: AssertionError
=========================== short test summary info ============================
FAILED numpy/ma/tests/test_core.py::TestMaskedArray::test_str_repr - AssertionError: 
Items are not equal:
 ACTUAL: 'masked_array(\n  data=[[1, 2, 3],\n        [4, --, 6]],\n  mask=[[False, False, False],\n        [False,  True, False]],\n  fill_value=np.int64(127),\n  dtype=int8)'
 DESIRED: 'masked_array(\n  data=[[1, 2, 3],\n        [4, --, 6]],\n  mask=[[False, False, False],\n        [False,  True, False]],\n  fill_value=np.int64(999999),\n  dtype=int8)'
= 1 failed, 43632 passed, 882 skipped, 2783 deselected, 35 xfailed, 4 xpassed in 272.62s (0:04:32) =