Skip to content

PyMapNoneTest.test_none_collisions fails on 32-bit x86 systems #50

Description

@mgorny

When running the package's tests on 32-bit x86, I get the following failure:

$ pytest
=============================================================== test session starts ===============================================================
platform linux -- Python 3.7.9, pytest-5.4.2, py-1.8.0, pluggy-0.13.1
rootdir: /home/mgorny/immutables, inifile: pytest.ini, testpaths: tests
plugins: hypothesis-5.18.1, services-2.0.1, backports.unittest-mock-1.5
collected 152 items                                                                                                                               

tests/test_issue24.py .....sssssss
tests/test_map.py .............................................................sssssssssssssssssssssssssssssssssssssssssssssssssssssssssssss
tests/test_none_keys.py ......F..sssssssss

==================================================================== FAILURES =====================================================================
_______________________________________________________ PyMapNoneTest.test_none_collisions ________________________________________________________
Traceback (most recent call last):
  File "/home/mgorny/immutables/tests/test_none_keys.py", line 47, in test_none_collisions
    self.assertEqual(map_mask(c_hash, j*5), idx)
  File "/usr/lib/python3.7/unittest/case.py", line 852, in assertEqual
    assertion_func(first, second, msg=msg)
  File "/usr/lib/python3.7/unittest/case.py", line 845, in _baseAssertEqual
    raise self.failureException(msg)
AssertionError: 10 != 9
============================================================= short test summary info =============================================================
FAILED tests/test_none_keys.py::PyMapNoneTest::test_none_collisions - AssertionError: 10 != 9
==================================================== 1 failed, 74 passed, 77 skipped in 17.31s ====================================================

I've been able to bisect this to:

commit 913572c2ef8a4c948bb8b67ff2064d6920e313e7
Author: TIGirardi <55336837+TIGirardi@users.noreply.github.com>
Date:   Mon May 18 00:58:10 2020 -0300

    Accept None as a key in pure python module (#42)

 immutables/map.py       |  31 +--
 tests/test_none_keys.py | 511 ++++++++++++++++++++++++++++++++++++++++++++++++
 2 files changed, 530 insertions(+), 12 deletions(-)
 create mode 100644 tests/test_none_keys.py

Original bug report: https://bugs.gentoo.org/739578

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Fields

    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions