Skip to content

Commit 3f4a04e

Browse files
authored
GH-50277: [CI][Python] Avoid using generators for test parametrization on newer Pytest (#50278)
### Rationale for this change On the hypothesis tests we treat Warnings as errors and the job has been failing with the latest Pytest version (9.1.0). This is related to: - pytest-dev/pytest#13409 With the latest pytest using generators for parametrization has been deprecated. ### What changes are included in this PR? Change the generator that was causing the failures and return a list of supported_factories instead. ### Are these changes tested? Yes both locally and the archery test that was failing. ### Are there any user-facing changes? No * GitHub Issue: #50277 Authored-by: Raúl Cumplido <raulcumplido@gmail.com> Signed-off-by: Raúl Cumplido <raulcumplido@gmail.com>
1 parent 1e0c66d commit 3f4a04e

1 file changed

Lines changed: 2 additions & 3 deletions

File tree

python/pyarrow/tests/test_memory.py

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -38,9 +38,8 @@ def backend_factory(backend_name):
3838

3939

4040
def supported_factories():
41-
yield pa.default_memory_pool
42-
for backend_name in pa.supported_memory_backends():
43-
yield backend_factory(backend_name)
41+
factories = [pa.default_memory_pool]
42+
return factories + [backend_factory(bn) for bn in pa.supported_memory_backends()]
4443

4544

4645
@contextlib.contextmanager

0 commit comments

Comments
 (0)