diff --git a/tests/dicts/test_functions.py b/tests/dicts/test_functions.py index f4330237..d6ed5ae7 100644 --- a/tests/dicts/test_functions.py +++ b/tests/dicts/test_functions.py @@ -1,5 +1,5 @@ # -# Copyright (C) 2021 - 2024 Satoru SATOH +# Copyright (C) 2021 - 2025 Satoru SATOH # SPDX-License-Identifier: MIT # # pylint: disable=missing-docstring,protected-access @@ -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): @@ -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): @@ -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), ), diff --git a/tests/processors/test_processors.py b/tests/processors/test_processors.py index b29df125..bb3226fd 100644 --- a/tests/processors/test_processors.py +++ b/tests/processors/test_processors.py @@ -1,5 +1,5 @@ # -# Copyright (C) 2018 - 2024 Satoru SATOH +# Copyright (C) 2018 - 2025 Satoru SATOH # SPDX-License-Identifier: MIT # # pylint: disable=missing-docstring @@ -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