Skip to content

Commit

Permalink
chore: fix tests for py3.12
Browse files Browse the repository at this point in the history
  • Loading branch information
supersergiy committed Feb 4, 2025
1 parent 395790e commit bf0881e
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 8 deletions.
8 changes: 4 additions & 4 deletions tests/unit/layer/test_layer_set.py
Original file line number Diff line number Diff line change
Expand Up @@ -10,8 +10,8 @@ def test_read(mocker):
idx = mocker.MagicMock()
result = layer_set[idx]
assert result == {"a": "a", "b": "b"}
layer_a.read_with_procs.called_with(idx=idx)
layer_b.read_with_procs.called_with(idx=idx)
layer_a.read_with_procs.assert_called_with(idx)
layer_b.read_with_procs.assert_called_with(idx)


def test_write(mocker):
Expand All @@ -22,5 +22,5 @@ def test_write(mocker):
layer_set = build_layer_set(layers={"a": layer_a, "b": layer_b})
idx = mocker.MagicMock()
layer_set[idx] = {"a": 1, "b": 2}
layer_a.write_with_procs.called_with(idx=idx, data=1)
layer_b.write_with_procs.called_with(idx=idx, data=2)
layer_a.write_with_procs.assert_called_with(idx, 1)
layer_b.write_with_procs.assert_called_with(idx, 2)
8 changes: 4 additions & 4 deletions tests/unit/layer/volumetric/test_layer_set.py
Original file line number Diff line number Diff line change
Expand Up @@ -13,8 +13,8 @@ def test_read(mocker):
idx = VolumetricIndex(bbox=BBox3D(bounds=((0, 1), (0, 1), (0, 1))), resolution=Vec3D(1, 1, 1))
result = layer_set[idx]
assert result == {"a": np.array([1]), "b": np.array([2])}
layer_a.read_with_procs.called_with(idx=idx)
layer_b.read_with_procs.called_with(idx=idx)
layer_a.read_with_procs.assert_called_with(idx)
layer_b.read_with_procs.assert_called_with(idx)


def test_write(mocker):
Expand All @@ -25,5 +25,5 @@ def test_write(mocker):
layer_set = build_volumetric_layer_set(layers={"a": layer_a, "b": layer_b})
idx = VolumetricIndex(bbox=BBox3D(bounds=((0, 1), (0, 1), (0, 1))), resolution=Vec3D(1, 1, 1))
layer_set[idx] = {"a": 1, "b": 2}
layer_a.write_with_procs.called_with(idx=idx, data=1)
layer_b.write_with_procs.called_with(idx=idx, data=2)
layer_a.write_with_procs.assert_called_with(idx, 1)
layer_b.write_with_procs.assert_called_with(idx, 2)
Empty file removed zetta_utils/tmp.py
Empty file.

0 comments on commit bf0881e

Please sign in to comment.