From 1a2486e35be36dcb73e88484b3f523347cff2017 Mon Sep 17 00:00:00 2001 From: Thomas A Caswell Date: Thu, 16 Jan 2025 22:51:11 -0500 Subject: [PATCH] TST: add failing test --- tests/test_validation.py | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/tests/test_validation.py b/tests/test_validation.py index 438139d..2923468 100644 --- a/tests/test_validation.py +++ b/tests/test_validation.py @@ -113,14 +113,18 @@ def test_nested_mutation(d): d["x"]["y"] = {} d["x"]["y"]["z"] = {} d["x"]["y"]["z"]["i"] = [] - d["x"]["y"]["z"]["i"].append(1) + lsti = d["x"]["y"]["z"]["i"] + lsti.append([]) + lsti[0].append(1) d["x"]["y"]["z"]["j"] = 2 d["x"]["y"]["z"]["k"] = [] d["x"]["y"]["z"]["k"].append({}) d["x"]["y"]["z"]["k"][0]["p"] = [] d["x"]["y"]["z"]["k"][0]["p"].append(3) - assert d == {"x": {"y": {"z": {"i": [1], "j": 2, "k": [{"p": [3]}]}}}} + assert d["x"]["y"]["z"]["i"] == lsti + + assert d == {"x": {"y": {"z": {"i": [[1]], "j": 2, "k": [{"p": [3]}]}}}} def test_copy_returns_plain_object(d):