Skip to content

Testsuite failure on 32-bits architecture #302

@baldurmen

Description

@baldurmen

Describe the bug
The testsuite fails on 32-bits architecture (i386, armhf) with the following error:


_ TestNumpyDelta.test_numpy_delta_cases[delta_numpy7_arrays_of_different_sizes] _

self = <tests.test_delta.TestNumpyDelta object at 0xf58e0358>
t1 = array([1, 2, 3, 4]), t2 = array([ 5,  6,  7,  8,  9, 10])
deepdiff_kwargs = {}, to_delta_kwargs = {}
expected_delta_dict = {'_numpy_paths': {'root': 'int64'}, 'iterable_item_added': {'root[4]': 9, 'root[5]': 10}, 'values_changed': {'root[0]': {'new_value': 5}, 'root[1]': {'new_value': 6}, 'root[2]': {'new_value': 7}, 'root[3]': {'new_value': 8}}}
expected_result = 't2'

    @pytest.mark.parametrize(**DELTA_NUMPY_TEST_PARAMS)
    def test_numpy_delta_cases(self, t1, t2, deepdiff_kwargs, to_delta_kwargs, expected_delta_dict, expected_result):
        diff = DeepDiff(t1, t2, **deepdiff_kwargs)
        delta_dict = diff._to_delta_dict(**to_delta_kwargs)
        if expected_delta_dict:
>           assert expected_delta_dict == delta_dict
E           AssertionError: assert {'_numpy_path...w_value': 8}}} == {'_numpy_path...w_value': 8}}}
E             Omitting 2 identical items, use -vv to show
E             Differing items:
E             {'_numpy_paths': {'root': 'int64'}} != {'_numpy_paths': {'root': 'int32'}}
E             Use -v to get the full diff

tests/test_delta.py:991: AssertionError

Here are the complete testsuite logs, ran on the Debian package in unstable:

As you can see, the testsuite passes on 64-bits systems:

I am not sure if this is purely a problem with the testsuite, or if this is the result of a real bug on those systems.

To Reproduce
Run the testsuite on a 32-bits machines or VM via QEMU.

Expected behavior
The testsuite should not fail on 32-bits systems.

OS, DeepDiff version and Python version (please complete the following information):

  • OS: Debian
  • Version: Sid
  • Deepdiff version: 5.6.0

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