MCPcopy Index your code
hub / github.com/pydata/xarray / test_3d

Method test_3d

xarray/tests/test_combine.py:71–95  ·  view source on GitHub ↗
(self)

Source from the content-addressed store, hash-verified

69 assert_combined_tile_ids_equal(expected, actual)
70
71 def test_3d(self):
72 ds = create_test_data
73 input = [
74 [[ds(0), ds(1)], [ds(2), ds(3)], [ds(4), ds(5)]],
75 [[ds(6), ds(7)], [ds(8), ds(9)], [ds(10), ds(11)]],
76 ]
77
78 expected = {
79 (0, 0, 0): ds(0),
80 (0, 0, 1): ds(1),
81 (0, 1, 0): ds(2),
82 (0, 1, 1): ds(3),
83 (0, 2, 0): ds(4),
84 (0, 2, 1): ds(5),
85 (1, 0, 0): ds(6),
86 (1, 0, 1): ds(7),
87 (1, 1, 0): ds(8),
88 (1, 1, 1): ds(9),
89 (1, 2, 0): ds(10),
90 (1, 2, 1): ds(11),
91 }
92 actual: dict[tuple[int, ...], Dataset] = _infer_concat_order_from_positions(
93 input
94 )
95 assert_combined_tile_ids_equal(expected, actual)
96
97 def test_single_dataset(self):
98 ds = create_test_data(0)

Callers

nothing calls this directly

Calls 3

dsFunction · 0.70

Tested by

no test coverage detected