From af0a0f319c6b26735b63e13e4d1f1d9b6b33d5ec Mon Sep 17 00:00:00 2001 From: Andrew Svetlov Date: Mon, 23 Jun 2025 08:48:47 +0200 Subject: [PATCH 1/4] Shorten fixture ids --- ...-c-extension.pickle.0 => cimultidict-c.pickle.0} | 0 ...-c-extension.pickle.1 => cimultidict-c.pickle.1} | Bin ...-c-extension.pickle.2 => cimultidict-c.pickle.2} | Bin ...-c-extension.pickle.3 => cimultidict-c.pickle.3} | Bin ...-c-extension.pickle.4 => cimultidict-c.pickle.4} | Bin ...-c-extension.pickle.5 => cimultidict-c.pickle.5} | Bin ...pure-python.pickle.0 => cimultidict-py.pickle.0} | 0 ...pure-python.pickle.1 => cimultidict-py.pickle.1} | Bin ...pure-python.pickle.2 => cimultidict-py.pickle.2} | Bin ...pure-python.pickle.3 => cimultidict-py.pickle.3} | Bin ...pure-python.pickle.4 => cimultidict-py.pickle.4} | Bin ...pure-python.pickle.5 => cimultidict-py.pickle.5} | Bin tests/conftest.py | 4 ++-- .../{istr-c-extension.pickle.0 => istr-c.pickle.0} | 0 .../{istr-c-extension.pickle.1 => istr-c.pickle.1} | Bin .../{istr-c-extension.pickle.2 => istr-c.pickle.2} | Bin .../{istr-c-extension.pickle.3 => istr-c.pickle.3} | Bin .../{istr-c-extension.pickle.4 => istr-c.pickle.4} | Bin .../{istr-c-extension.pickle.5 => istr-c.pickle.5} | Bin .../{istr-pure-python.pickle.0 => istr-py.pickle.0} | 0 .../{istr-pure-python.pickle.1 => istr-py.pickle.1} | Bin .../{istr-pure-python.pickle.2 => istr-py.pickle.2} | Bin .../{istr-pure-python.pickle.3 => istr-py.pickle.3} | Bin .../{istr-pure-python.pickle.4 => istr-py.pickle.4} | Bin .../{istr-pure-python.pickle.5 => istr-py.pickle.5} | Bin ...ct-c-extension.pickle.0 => multidict-c.pickle.0} | 0 ...ct-c-extension.pickle.1 => multidict-c.pickle.1} | Bin ...ct-c-extension.pickle.2 => multidict-c.pickle.2} | Bin ...ct-c-extension.pickle.3 => multidict-c.pickle.3} | Bin ...ct-c-extension.pickle.4 => multidict-c.pickle.4} | Bin ...ct-c-extension.pickle.5 => multidict-c.pickle.5} | Bin ...t-pure-python.pickle.0 => multidict-py.pickle.0} | 0 ...t-pure-python.pickle.1 => multidict-py.pickle.1} | Bin ...t-pure-python.pickle.2 => multidict-py.pickle.2} | Bin ...t-pure-python.pickle.3 => multidict-py.pickle.3} | Bin ...t-pure-python.pickle.4 => multidict-py.pickle.4} | Bin ...t-pure-python.pickle.5 => multidict-py.pickle.5} | Bin 37 files changed, 2 insertions(+), 2 deletions(-) rename tests/{cimultidict-c-extension.pickle.0 => cimultidict-c.pickle.0} (100%) rename tests/{cimultidict-c-extension.pickle.1 => cimultidict-c.pickle.1} (100%) rename tests/{cimultidict-c-extension.pickle.2 => cimultidict-c.pickle.2} (100%) rename tests/{cimultidict-c-extension.pickle.3 => cimultidict-c.pickle.3} (100%) rename tests/{cimultidict-c-extension.pickle.4 => cimultidict-c.pickle.4} (100%) rename tests/{cimultidict-c-extension.pickle.5 => cimultidict-c.pickle.5} (100%) rename tests/{cimultidict-pure-python.pickle.0 => cimultidict-py.pickle.0} (100%) rename tests/{cimultidict-pure-python.pickle.1 => cimultidict-py.pickle.1} (100%) rename tests/{cimultidict-pure-python.pickle.2 => cimultidict-py.pickle.2} (100%) rename tests/{cimultidict-pure-python.pickle.3 => cimultidict-py.pickle.3} (100%) rename tests/{cimultidict-pure-python.pickle.4 => cimultidict-py.pickle.4} (100%) rename tests/{cimultidict-pure-python.pickle.5 => cimultidict-py.pickle.5} (100%) rename tests/{istr-c-extension.pickle.0 => istr-c.pickle.0} (100%) rename tests/{istr-c-extension.pickle.1 => istr-c.pickle.1} (100%) rename tests/{istr-c-extension.pickle.2 => istr-c.pickle.2} (100%) rename tests/{istr-c-extension.pickle.3 => istr-c.pickle.3} (100%) rename tests/{istr-c-extension.pickle.4 => istr-c.pickle.4} (100%) rename tests/{istr-c-extension.pickle.5 => istr-c.pickle.5} (100%) rename tests/{istr-pure-python.pickle.0 => istr-py.pickle.0} (100%) rename tests/{istr-pure-python.pickle.1 => istr-py.pickle.1} (100%) rename tests/{istr-pure-python.pickle.2 => istr-py.pickle.2} (100%) rename tests/{istr-pure-python.pickle.3 => istr-py.pickle.3} (100%) rename tests/{istr-pure-python.pickle.4 => istr-py.pickle.4} (100%) rename tests/{istr-pure-python.pickle.5 => istr-py.pickle.5} (100%) rename tests/{multidict-c-extension.pickle.0 => multidict-c.pickle.0} (100%) rename tests/{multidict-c-extension.pickle.1 => multidict-c.pickle.1} (100%) rename tests/{multidict-c-extension.pickle.2 => multidict-c.pickle.2} (100%) rename tests/{multidict-c-extension.pickle.3 => multidict-c.pickle.3} (100%) rename tests/{multidict-c-extension.pickle.4 => multidict-c.pickle.4} (100%) rename tests/{multidict-c-extension.pickle.5 => multidict-c.pickle.5} (100%) rename tests/{multidict-pure-python.pickle.0 => multidict-py.pickle.0} (100%) rename tests/{multidict-pure-python.pickle.1 => multidict-py.pickle.1} (100%) rename tests/{multidict-pure-python.pickle.2 => multidict-py.pickle.2} (100%) rename tests/{multidict-pure-python.pickle.3 => multidict-py.pickle.3} (100%) rename tests/{multidict-pure-python.pickle.4 => multidict-py.pickle.4} (100%) rename tests/{multidict-pure-python.pickle.5 => multidict-py.pickle.5} (100%) diff --git a/tests/cimultidict-c-extension.pickle.0 b/tests/cimultidict-c.pickle.0 similarity index 100% rename from tests/cimultidict-c-extension.pickle.0 rename to tests/cimultidict-c.pickle.0 diff --git a/tests/cimultidict-c-extension.pickle.1 b/tests/cimultidict-c.pickle.1 similarity index 100% rename from tests/cimultidict-c-extension.pickle.1 rename to tests/cimultidict-c.pickle.1 diff --git a/tests/cimultidict-c-extension.pickle.2 b/tests/cimultidict-c.pickle.2 similarity index 100% rename from tests/cimultidict-c-extension.pickle.2 rename to tests/cimultidict-c.pickle.2 diff --git a/tests/cimultidict-c-extension.pickle.3 b/tests/cimultidict-c.pickle.3 similarity index 100% rename from tests/cimultidict-c-extension.pickle.3 rename to tests/cimultidict-c.pickle.3 diff --git a/tests/cimultidict-c-extension.pickle.4 b/tests/cimultidict-c.pickle.4 similarity index 100% rename from tests/cimultidict-c-extension.pickle.4 rename to tests/cimultidict-c.pickle.4 diff --git a/tests/cimultidict-c-extension.pickle.5 b/tests/cimultidict-c.pickle.5 similarity index 100% rename from tests/cimultidict-c-extension.pickle.5 rename to tests/cimultidict-c.pickle.5 diff --git a/tests/cimultidict-pure-python.pickle.0 b/tests/cimultidict-py.pickle.0 similarity index 100% rename from tests/cimultidict-pure-python.pickle.0 rename to tests/cimultidict-py.pickle.0 diff --git a/tests/cimultidict-pure-python.pickle.1 b/tests/cimultidict-py.pickle.1 similarity index 100% rename from tests/cimultidict-pure-python.pickle.1 rename to tests/cimultidict-py.pickle.1 diff --git a/tests/cimultidict-pure-python.pickle.2 b/tests/cimultidict-py.pickle.2 similarity index 100% rename from tests/cimultidict-pure-python.pickle.2 rename to tests/cimultidict-py.pickle.2 diff --git a/tests/cimultidict-pure-python.pickle.3 b/tests/cimultidict-py.pickle.3 similarity index 100% rename from tests/cimultidict-pure-python.pickle.3 rename to tests/cimultidict-py.pickle.3 diff --git a/tests/cimultidict-pure-python.pickle.4 b/tests/cimultidict-py.pickle.4 similarity index 100% rename from tests/cimultidict-pure-python.pickle.4 rename to tests/cimultidict-py.pickle.4 diff --git a/tests/cimultidict-pure-python.pickle.5 b/tests/cimultidict-py.pickle.5 similarity index 100% rename from tests/cimultidict-pure-python.pickle.5 rename to tests/cimultidict-py.pickle.5 diff --git a/tests/conftest.py b/tests/conftest.py index a37f58f2d..2e7d64511 100644 --- a/tests/conftest.py +++ b/tests/conftest.py @@ -39,7 +39,7 @@ class MultidictImplementation: @cached_property def tag(self) -> str: """Return a text representation of the pure-python attribute.""" - return "pure-python" if self.is_pure_python else "c-extension" + return "py" if self.is_pure_python else "c" @cached_property def imported_module(self) -> ModuleType: @@ -79,7 +79,7 @@ def multidict_module( @pytest.fixture( scope="session", params=("MultiDict", "CIMultiDict"), - ids=("case-sensitive", "case-insensitive"), + ids=("cs", "ci"), ) def any_multidict_class_name(request: pytest.FixtureRequest) -> str: """Return a class name of a mutable multidict implementation.""" diff --git a/tests/istr-c-extension.pickle.0 b/tests/istr-c.pickle.0 similarity index 100% rename from tests/istr-c-extension.pickle.0 rename to tests/istr-c.pickle.0 diff --git a/tests/istr-c-extension.pickle.1 b/tests/istr-c.pickle.1 similarity index 100% rename from tests/istr-c-extension.pickle.1 rename to tests/istr-c.pickle.1 diff --git a/tests/istr-c-extension.pickle.2 b/tests/istr-c.pickle.2 similarity index 100% rename from tests/istr-c-extension.pickle.2 rename to tests/istr-c.pickle.2 diff --git a/tests/istr-c-extension.pickle.3 b/tests/istr-c.pickle.3 similarity index 100% rename from tests/istr-c-extension.pickle.3 rename to tests/istr-c.pickle.3 diff --git a/tests/istr-c-extension.pickle.4 b/tests/istr-c.pickle.4 similarity index 100% rename from tests/istr-c-extension.pickle.4 rename to tests/istr-c.pickle.4 diff --git a/tests/istr-c-extension.pickle.5 b/tests/istr-c.pickle.5 similarity index 100% rename from tests/istr-c-extension.pickle.5 rename to tests/istr-c.pickle.5 diff --git a/tests/istr-pure-python.pickle.0 b/tests/istr-py.pickle.0 similarity index 100% rename from tests/istr-pure-python.pickle.0 rename to tests/istr-py.pickle.0 diff --git a/tests/istr-pure-python.pickle.1 b/tests/istr-py.pickle.1 similarity index 100% rename from tests/istr-pure-python.pickle.1 rename to tests/istr-py.pickle.1 diff --git a/tests/istr-pure-python.pickle.2 b/tests/istr-py.pickle.2 similarity index 100% rename from tests/istr-pure-python.pickle.2 rename to tests/istr-py.pickle.2 diff --git a/tests/istr-pure-python.pickle.3 b/tests/istr-py.pickle.3 similarity index 100% rename from tests/istr-pure-python.pickle.3 rename to tests/istr-py.pickle.3 diff --git a/tests/istr-pure-python.pickle.4 b/tests/istr-py.pickle.4 similarity index 100% rename from tests/istr-pure-python.pickle.4 rename to tests/istr-py.pickle.4 diff --git a/tests/istr-pure-python.pickle.5 b/tests/istr-py.pickle.5 similarity index 100% rename from tests/istr-pure-python.pickle.5 rename to tests/istr-py.pickle.5 diff --git a/tests/multidict-c-extension.pickle.0 b/tests/multidict-c.pickle.0 similarity index 100% rename from tests/multidict-c-extension.pickle.0 rename to tests/multidict-c.pickle.0 diff --git a/tests/multidict-c-extension.pickle.1 b/tests/multidict-c.pickle.1 similarity index 100% rename from tests/multidict-c-extension.pickle.1 rename to tests/multidict-c.pickle.1 diff --git a/tests/multidict-c-extension.pickle.2 b/tests/multidict-c.pickle.2 similarity index 100% rename from tests/multidict-c-extension.pickle.2 rename to tests/multidict-c.pickle.2 diff --git a/tests/multidict-c-extension.pickle.3 b/tests/multidict-c.pickle.3 similarity index 100% rename from tests/multidict-c-extension.pickle.3 rename to tests/multidict-c.pickle.3 diff --git a/tests/multidict-c-extension.pickle.4 b/tests/multidict-c.pickle.4 similarity index 100% rename from tests/multidict-c-extension.pickle.4 rename to tests/multidict-c.pickle.4 diff --git a/tests/multidict-c-extension.pickle.5 b/tests/multidict-c.pickle.5 similarity index 100% rename from tests/multidict-c-extension.pickle.5 rename to tests/multidict-c.pickle.5 diff --git a/tests/multidict-pure-python.pickle.0 b/tests/multidict-py.pickle.0 similarity index 100% rename from tests/multidict-pure-python.pickle.0 rename to tests/multidict-py.pickle.0 diff --git a/tests/multidict-pure-python.pickle.1 b/tests/multidict-py.pickle.1 similarity index 100% rename from tests/multidict-pure-python.pickle.1 rename to tests/multidict-py.pickle.1 diff --git a/tests/multidict-pure-python.pickle.2 b/tests/multidict-py.pickle.2 similarity index 100% rename from tests/multidict-pure-python.pickle.2 rename to tests/multidict-py.pickle.2 diff --git a/tests/multidict-pure-python.pickle.3 b/tests/multidict-py.pickle.3 similarity index 100% rename from tests/multidict-pure-python.pickle.3 rename to tests/multidict-py.pickle.3 diff --git a/tests/multidict-pure-python.pickle.4 b/tests/multidict-py.pickle.4 similarity index 100% rename from tests/multidict-pure-python.pickle.4 rename to tests/multidict-py.pickle.4 diff --git a/tests/multidict-pure-python.pickle.5 b/tests/multidict-py.pickle.5 similarity index 100% rename from tests/multidict-pure-python.pickle.5 rename to tests/multidict-py.pickle.5 From 9ee6b0d4a9bfbc87039d68e6a8d7fed2ef0c61b8 Mon Sep 17 00:00:00 2001 From: Andrew Svetlov Date: Mon, 23 Jun 2025 08:54:01 +0200 Subject: [PATCH 2/4] step --- tests/conftest.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tests/conftest.py b/tests/conftest.py index 2e7d64511..dfc1a6703 100644 --- a/tests/conftest.py +++ b/tests/conftest.py @@ -49,7 +49,7 @@ def imported_module(self) -> ModuleType: def __str__(self) -> str: """Render the implementation facade instance as a string.""" - return f"{self.tag}-module" + return self.tag @pytest.fixture( From ca9253ee53f74133206382debdb1b4bc4212a279 Mon Sep 17 00:00:00 2001 From: Andrew Svetlov Date: Mon, 23 Jun 2025 08:56:21 +0200 Subject: [PATCH 3/4] changelog --- CHANGES/1192.contrib | 3 +++ 1 file changed, 3 insertions(+) create mode 100644 CHANGES/1192.contrib diff --git a/CHANGES/1192.contrib b/CHANGES/1192.contrib new file mode 100644 index 000000000..fd36c8b0f --- /dev/null +++ b/CHANGES/1192.contrib @@ -0,0 +1,3 @@ +Shorted fixture parametrization ids. + +For example, `test_keys_view_xor[case-insensitive-pure-python-module]` becomes `test_keys_view_xor[ci-py]` -- by :user:`asvetlov`. From 090d511598fc144edfa4e1a5ae4cff6bf4bdf157 Mon Sep 17 00:00:00 2001 From: Andrew Svetlov Date: Mon, 23 Jun 2025 08:58:12 +0200 Subject: [PATCH 4/4] fix --- CHANGES/1192.contrib | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/CHANGES/1192.contrib b/CHANGES/1192.contrib index fd36c8b0f..541d7fe4f 100644 --- a/CHANGES/1192.contrib +++ b/CHANGES/1192.contrib @@ -1,3 +1,3 @@ Shorted fixture parametrization ids. -For example, `test_keys_view_xor[case-insensitive-pure-python-module]` becomes `test_keys_view_xor[ci-py]` -- by :user:`asvetlov`. +For example, ``test_keys_view_xor[case-insensitive-pure-python-module]`` becomes ``test_keys_view_xor[ci-py]`` -- by :user:`asvetlov`.