#1148654 test_get_next_nearest_neighbors fails on 32-bit arches

#1148654#5
Date:
2026-09-21 15:16:01 UTC
From:
To:
python-emmet-core is failing debci tests on 32-bit archs

https://ci.debian.net/packages/p/python-emmet-core/testing/armhf/74964888/
https://ci.debian.net/packages/p/python-emmet-core/testing/i386/74676001/

From armhf:

491s =================================== FAILURES ===================================
491s _______________________ test_get_next_nearest_neighbors ________________________
491s
491s tin_dioxide = Structure Graph
491s Structure:
491s Structure Summary
491s Lattice
491s     abc : 3.24322132 4.82933499 4.83533691
491s  angles : 90.0 90.0 9...   2  (0, 0, -1)
491s    1     3  (0, -1, 0)
491s    1     3  (-1, -1, 0)
491s    1     4  (0, 0, 0)
491s    1     5  (0, -1, -1)
491s
491s ba_n = Structure Graph
491s Structure:
491s Structure Summary
491s Lattice
491s     abc : 4.2649267285617 4.26545425482445 7.340013623965557
491s  an...   4  (0, 0, 0)
491s    3     4  (0, 1, 0)
491s    3     5  (0, 0, 0)
491s    3     5  (1, 0, 0)
491s    3     5  (1, -1, 0)
491s
491s
491s     def test_get_next_nearest_neighbors(tin_dioxide, ba_n):
491s         """Check getting next nearest neighbors."""
491s         sa = SiteAnalyzer(tin_dioxide)
491s         info = sa.get_next_nearest_neighbors(5)
491s
491s         assert len(info) == 14
491s         idx = [i for i, s in enumerate(info) if s["connectivity"] == "edge"][0]
491s         assert info[idx]["element"] == "O2-"
491s         assert info[idx]["connectivity"] == "edge"
491s         assert info[idx]["geometry"]["type"] == "trigonal planar"
491s         assert info[idx]["inequiv_index"] == 2
491s
491s         info = sa.get_next_nearest_neighbors(0, inc_inequivalent_site_index=False)
491s         assert "inequiv_index" not in info[0]
491s
491s         info = sa.get_next_nearest_neighbors(0)
491s         assert info[0]["element"] == "Sn4+"
491s         assert info[0]["connectivity"] == "edge"
491s         assert info[0]["geometry"]["type"] == "octahedral"
491s         assert len(info[0]["angles"]) == 2
491s         assert info[0]["angles"][0] == pytest.approx(101.62287790513848)
491s         assert info[0]["distance"] == pytest.approx(3.24322132)
491s
491s         # check different structure without oxi state
491s         sa = SiteAnalyzer(ba_n)
491s         info = sa.get_next_nearest_neighbors(0)
491s         assert len(info) == 36
491s         assert info[5]["element"] == "N"
491s         assert info[5]["connectivity"] == "edge"
491s         assert info[5]["geometry"]["type"] == "6-coordinate"
491s         assert len(info[5]["angles"]) == 2
491s >       assert info[5]["angles"][0] == pytest.approx(83.91397867959587)
491s E       assert 70.47423500237565 == 83.91397867959587 ± 8.4e-05
491s E
491s E         comparison failed
491s E         Obtained: 70.47423500237565
491s E         Expected: 83.91397867959587 ± 8.4e-05
491s
491s tests/featurization/robocrys/condense/test_site.py:130: AssertionError

Reported upstream,
https://github.com/materialsproject/emmet/issues/1521