Skip to content

Commit 4ebbb53

Browse files
authored
Apply suggestions from code review
1 parent fe81d01 commit 4ebbb53

File tree

1 file changed

+7
-6
lines changed

1 file changed

+7
-6
lines changed

tests/tests_fabric/utilities/test_logger.py

Lines changed: 7 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -67,12 +67,13 @@ def test_flatten_dict():
6767
params = {"dl": [{"a": 1, "c": 3}, {"b": 2, "d": 5}], "l": [1, 2, 3, 4]}
6868
params = _flatten_dict(params)
6969

70-
assert "dl" not in params
71-
assert params["dl/0/a"] == 1
72-
assert params["dl/0/c"] == 3
73-
assert params["dl/1/b"] == 2
74-
assert params["dl/1/d"] == 5
75-
assert params["l"] == [1, 2, 3, 4]
70+
assert params == {
71+
"dl/0/a": 1,
72+
"dl/0/c": 3,
73+
"dl/1/b": 2,
74+
"dl/1/d": 5,
75+
"l": [1, 2, 3, 4]
76+
}
7677

7778
# Test flattening of argparse Namespace
7879
params = Namespace(a=1, b=2)

0 commit comments

Comments
 (0)