diff --git a/datatree/tests/test_formatting.py b/datatree/tests/test_formatting.py index d0e3e9fd..0f64644c 100644 --- a/datatree/tests/test_formatting.py +++ b/datatree/tests/test_formatting.py @@ -90,11 +90,14 @@ def test_diff_node_names(self): assert actual == expected def test_diff_node_data(self): - ds1 = Dataset({"u": 0, "v": 1}) - ds3 = Dataset({"w": 5}) + import numpy as np + + # casting to int64 explicitly ensures that int64s are created on all architectures + ds1 = Dataset({"u": np.int64(0), "v": np.int64(1)}) + ds3 = Dataset({"w": np.int64(5)}) dt_1 = DataTree.from_dict({"a": ds1, "a/b": ds3}) - ds2 = Dataset({"u": 0}) - ds4 = Dataset({"w": 6}) + ds2 = Dataset({"u": np.int64(0)}) + ds4 = Dataset({"w": np.int64(6)}) dt_2 = DataTree.from_dict({"a": ds2, "a/b": ds4}) expected = dedent( diff --git a/docs/source/whats-new.rst b/docs/source/whats-new.rst index 8bcf262b..5d70f914 100644 --- a/docs/source/whats-new.rst +++ b/docs/source/whats-new.rst @@ -39,6 +39,8 @@ Deprecations Bug fixes ~~~~~~~~~ +- Fix unittests on i386. (:pull:`249`) + By `Antonio Valentino `_. - Ensure nodepath class is compatible with python 3.12 (:pull:`260`) By `Max Grover `_.