From 30660197a5d4337c57f0b85e1c7c00fd3dbb0aa0 Mon Sep 17 00:00:00 2001 From: Angus Hollands Date: Tue, 20 Sep 2022 19:00:13 +0100 Subject: [PATCH] test: validate fix for #1679 --- tests/v2/test_1672-broadcast-parameters.py | 18 ++++++++++++++---- 1 file changed, 14 insertions(+), 4 deletions(-) diff --git a/tests/v2/test_1672-broadcast-parameters.py b/tests/v2/test_1672-broadcast-parameters.py index 1e9ba1df89..bd7cc18d89 100644 --- a/tests/v2/test_1672-broadcast-parameters.py +++ b/tests/v2/test_1672-broadcast-parameters.py @@ -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, @@ -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():