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

Testsuite failure on 32-bits architecture #302

Closed
baldurmen opened this issue Apr 11, 2022 · 4 comments · Fixed by #303
Closed

Testsuite failure on 32-bits architecture #302

baldurmen opened this issue Apr 11, 2022 · 4 comments · Fixed by #303

Comments

@baldurmen
Copy link
Contributor

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
@seperman
Copy link
Owner

Hi,
Not sure why we should be supporting 32bit systems. Perhaps I'm wrong. But that to me sounds like if DeepDiff is supposed to work on WinXP.

@baldurmen
Copy link
Contributor Author

baldurmen commented Apr 11, 2022

There are many systems that are not Windows XP but still run on 32-bits. I think i386 and armhf are good examples of "in the wild 32-bits" archs that are not deprecated and widely used.

If you do not wish to support those architectures (which would be a valid thing to do), please be explicit so we can modify the Debian packages accordingly :)

@seperman
Copy link
Owner

Hmm, ok the error seems easy to fix though: {'_numpy_paths': {'root': 'int64'}} != {'_numpy_paths': {'root': 'int32'}}
I will keep you posted once I fix it. PRs are very welcome too.

@baldurmen
Copy link
Contributor Author

I have a fix, I'll make a PR :)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants