Skip to content

Commit 8c41167

Browse files
committed
fix(test): shallow copy to avoid mutating base test inputs
1 parent 73784a1 commit 8c41167

1 file changed

Lines changed: 5 additions & 3 deletions

File tree

test.py

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -71,9 +71,11 @@ def test(name, inputs):
7171

7272

7373
def runTest(name, args, extraCallInputs, extraModelInputs):
74-
inputs = all_tests.get(name)
75-
if not inputs.get("callInputs", None):
76-
inputs.update({"callInputs": {}})
74+
origInputs = all_tests.get(name)
75+
inputs = {
76+
"modelInputs": origInputs.get("modelInputs", {}).copy(),
77+
"callInputs": origInputs.get("callInputs", {}).copy(),
78+
}
7779
inputs.get("callInputs").update(extraCallInputs)
7880
inputs.get("modelInputs").update(extraModelInputs)
7981

0 commit comments

Comments
 (0)