Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
12 changes: 6 additions & 6 deletions tests/dicts/test_functions.py
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
#
# Copyright (C) 2021 - 2024 Satoru SATOH <satoru.satoh gmail.com>
# Copyright (C) 2021 - 2025 Satoru SATOH <satoru.satoh gmail.com>
# SPDX-License-Identifier: MIT
#
# pylint: disable=missing-docstring,protected-access
Expand Down Expand Up @@ -44,8 +44,8 @@ def test_split_path(args, exp):
# FIXME: Add some more test cases
@pytest.mark.parametrize(
("args", "exp"),
(((dict(a=1, b=dict(c=2, )), "a.b.d", 3),
dict(a=dict(b=dict(d=3)), b=dict(c=2))),
((({"a": 1, "b": {"c": 2}}, "a.b.d", 3),
{"a": {"b": {"d": 3}}, "b": {"c": 2}}),
),
)
def test_set_(args, exp):
Expand All @@ -61,10 +61,10 @@ def test_set_(args, exp):
("obj", "opts", "exp"),
((OD((("a", 1), )),
{"ac_ordered": False, "ac_dict": dict},
dict(a=1)),
{"a": 1}),
(OD((("a", OD((("b", OD((("c", 1), ))), ))), )),
{"ac_ordered": False, "ac_dict": dict},
dict(a=dict(b=dict(c=1)))),
{"a": {"b": {"c": 1}}}),
),
)
def test_convert_to(obj, opts, exp):
Expand All @@ -73,7 +73,7 @@ def test_convert_to(obj, opts, exp):

@pytest.mark.parametrize(
("objs", "exp"),
((([], (), [x for x in range(10)], (x for x in range(4))), True),
((([], (), list(range(10)), list(range(4))), True),
(([], {}), False),
(([], "aaa"), False),
),
Expand Down
6 changes: 3 additions & 3 deletions tests/processors/test_processors.py
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
#
# Copyright (C) 2018 - 2024 Satoru SATOH <satoru.satoh gmail.com>
# Copyright (C) 2018 - 2025 Satoru SATOH <satoru.satoh gmail.com>
# SPDX-License-Identifier: MIT
#
# pylint: disable=missing-docstring
Expand Down Expand Up @@ -46,8 +46,8 @@ def test_processor_list_x():
with pytest.raises(ValueError):
prcs.list_x()

assert prcs.list_x("cid") == sorted(set(p.cid() for p in PRS))
assert prcs.list_x("type") == sorted(set(p.type() for p in PRS))
assert prcs.list_x("cid") == sorted({p.cid() for p in PRS})
assert prcs.list_x("type") == sorted({p.type() for p in PRS})

res = sorted(set(A.extensions() + B.extensions() + C.extensions()))
assert prcs.list_x("extension") == res
Loading