Skip to content

Commit

Permalink
test: validate fix for #1679
Browse files Browse the repository at this point in the history
  • Loading branch information
agoose77 committed Sep 20, 2022
1 parent 8b632a1 commit 3066019
Showing 1 changed file with 14 additions and 4 deletions.
18 changes: 14 additions & 4 deletions tests/v2/test_1672-broadcast-parameters.py
Original file line number Diff line number Diff line change
Expand Up @@ -255,12 +255,22 @@ def test_transform_float_int_2d_different_intersect():
this = ak._v2.contents.ListOffsetArray(
ak._v2.index.Index64(numpy.array([0, 3, 4], dtype="int64")),
ak._v2.contents.NumpyArray(numpy.array([1.0, 2.0, 3.0, 4.0], dtype="float64")),
parameters={"name": "this"},
parameters={
"name": "this",
"key": "value",
"parent": {"child": 1},
"pets": [{"name": "fido"}],
},
)
that = ak._v2.contents.ListOffsetArray(
ak._v2.index.Index64(numpy.array([0, 3, 4], dtype="int64")),
ak._v2.contents.NumpyArray(numpy.array([1, 2, 1, 9], dtype="int64")),
parameters={"name": "that"},
parameters={
"name": "that",
"key": "value",
"parent": {"child": 2},
"pets": [{"name": "fido"}],
},
)
this_next, that_next = ak._v2.operations.ak_transform.transform(
lambda *a, **k: None,
Expand All @@ -270,8 +280,8 @@ def test_transform_float_int_2d_different_intersect():
broadcast_parameters_rule="intersect",
)

assert this_next.parameters == {}
assert that_next.parameters == {}
assert this_next.parameters == that_next.parameters
assert that_next.parameters == {"key": "value", "pets": [{"name": "fido"}]}


def test_transform_float_int_2d_one_to_one_error():
Expand Down

0 comments on commit 3066019

Please sign in to comment.