From be4cf19bb1a2ec1a1e6cf597257a67c050905e12 Mon Sep 17 00:00:00 2001 From: Florian Bruhin Date: Fri, 27 Nov 2015 16:25:25 +0100 Subject: [PATCH] tests: Improve some parametrized test IDs. --- tests/conftest.py | 2 +- tests/unit/misc/test_split.py | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/tests/conftest.py b/tests/conftest.py index eb579beab..c40a66c39 100644 --- a/tests/conftest.py +++ b/tests/conftest.py @@ -203,7 +203,7 @@ def _generate_cmdline_tests(): yield TestCase(''.join(item), True) -@pytest.fixture(params=_generate_cmdline_tests()) +@pytest.fixture(params=_generate_cmdline_tests(), ids=lambda e: e.cmd) def cmdline_test(request): """Fixture which generates tests for things validating commandlines.""" # Import qutebrowser.app so all cmdutils.register decorators get run. diff --git a/tests/unit/misc/test_split.py b/tests/unit/misc/test_split.py index dd488fe85..a48d8b62f 100644 --- a/tests/unit/misc/test_split.py +++ b/tests/unit/misc/test_split.py @@ -126,7 +126,7 @@ class TestSplit: """Test split.""" - @pytest.fixture(params=_parse_split_test_data_str()) + @pytest.fixture(params=_parse_split_test_data_str(), ids=lambda e: e.input) def split_test_case(self, request): """Fixture to automatically parametrize all depending tests.