diff --git a/poetry.lock b/poetry.lock index a005797..02d248c 100644 --- a/poetry.lock +++ b/poetry.lock @@ -913,6 +913,20 @@ MarkupSafe = ">=2.0" [package.extras] i18n = ["Babel (>=2.7)"] +[[package]] +name = "lambdas" +version = "0.2.0" +description = "Typed lambdas that are short and readable" +optional = false +python-versions = ">=3.8.1,<4" +files = [ + {file = "lambdas-0.2.0-py3-none-any.whl", hash = "sha256:4cd3e6f10966951c5810b019d1693a0c0881d7646b2bbad28f87e4f43f8a053e"}, + {file = "lambdas-0.2.0.tar.gz", hash = "sha256:b9ddeb7d10f6f6abe665fe4a21e7441890696a42b406b9c3ef3de8fac256ebe8"}, +] + +[package.dependencies] +typing-extensions = ">=4.0,<5.0" + [[package]] name = "lxml" version = "4.9.3" @@ -2343,4 +2357,4 @@ typing_extensions = ">=4.0,<5.0" [metadata] lock-version = "2.0" python-versions = ">=3.10,<4.0" -content-hash = "2addfa91ebb9adbfb6c908672f7cc86ecc34477272375b88a52edff34db63943" +content-hash = "60dfa1dbc7ddf6ee51275166a05a6ed7ad27bfa5809c13164dd1ba58e46e8d19" diff --git a/pyproject.toml b/pyproject.toml index e8dd914..8b65e1c 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -24,6 +24,7 @@ jeeves-yeti-pyproject = { version = "^0.2.20", markers = "python_version >= '3.1 types-pyyaml = "^6.0.12.11" rdflib-pyld-compat = "^0.1.0" pytest-github-actions-annotate-failures = "^0.2.0" +lambdas = "^0.2.0" [build-system] requires = ["poetry-core"] diff --git a/tests/test_specification.py b/tests/test_specification.py index 245ad50..8e0c9f5 100644 --- a/tests/test_specification.py +++ b/tests/test_specification.py @@ -12,6 +12,7 @@ from tests.common import load_tests from tests.errors import FailureToFail from yaml_ld.errors import YAMLLDError +from lambdas import _ tests = Namespace('https://w3c.github.io/json-ld-api/tests/vocab#') @@ -34,11 +35,7 @@ def test_to_rdf(test_case: TestCase): assert actual_graph.isomorphic(expected_graph) -@pytest.mark.parametrize( - 'test_case', - load_tests(tests.ExpandTest), - ids=operator.attrgetter('test'), -) +@pytest.mark.parametrize('test_case', load_tests(tests.ExpandTest), ids=_.test) def test_expand(test_case: TestCase): raw_document = test_case.input.read_bytes()