Bug 2059963

Summary: python-parameterized fails to build with pytest 7
Product: [Fedora] Fedora Reporter: Miro Hrončok <mhroncok>
Component: python-parameterizedAssignee: Miro Hrončok <mhroncok>
Status: CLOSED ERRATA QA Contact: Fedora Extras Quality Assurance <extras-qa>
Severity: high Docs Contact:
Priority: unspecified    
Version: rawhideCC: code, igor.raits, thrnciar
Target Milestone: ---   
Target Release: ---   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: python-parameterized-0.8.1-1.fc37 Doc Type: If docs needed, set a value
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2022-06-09 10:32:46 UTC Type: Bug
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:
Bug Depends On:    
Bug Blocks: 2016048, 2045102, 2050629    

Description Miro Hrončok 2022-03-02 12:09:38 UTC
In this copr repo, I have updated pytest to 7.0.1:

https://copr.fedorainfracloud.org/coprs/churchyard/pytest-7/

Based on this PR:

https://src.fedoraproject.org/rpms/pytest/pull-request/25

I'd like to update pytest to 7 in Fedora 37, but python-parameterized 0.7.4-5 fails to build.

https://copr.fedorainfracloud.org/coprs/churchyard/pytest-7/package/python-parameterized/


___ ERROR at teardown of TestParameterizedClassDict_2_some_name.test_method ____

    def tearDownModule():
        missing = sorted(list(missing_tests))
>       assert_equal(missing, [])
E       AssertionError: Lists differ: ["test_instance_method('foo0', bar=None)",[461 chars]o')"] != []
E       
E       First list contains 12 additional elements.
E       First extra element 0:
E       "test_instance_method('foo0', bar=None)"
E       
E       + []
E       - ["test_instance_method('foo0', bar=None)",
E       -  "test_instance_method('foo1', bar=None)",
E       -  "test_instance_method('foo2', bar=42)",
E       -  'test_instance_method(42, bar=None)',
E       -  "test_mock_patch_standalone_function(42, 'umask')",
E       -  "test_naked_function('foo0', bar=None)",
E       -  "test_naked_function('foo1', bar=None)",
E       -  "test_naked_function('foo2', bar=42)",
E       -  'test_naked_function(42, bar=None)',
E       -  "test_patch_class_no_expand(42, 51, 'umask', 'getpid')",
E       -  "test_patch_no_expand(42, 51, 'umask')",
E       -  "test_wrapped_iterable_input('foo')"]

parameterized/test.py:371: AssertionError

See also https://github.com/wolever/parameterized/issues/34

There are several packages affected by this update, so I'd very much appreciate it if you could fix this failure. Please, check if your upstream hasn't already fixed it and backport the fix if possible. Report this failure to your upstream otherwise. If you need specific help, let me know.

Thanks!

Comment 1 Ben Beasley 2022-03-10 17:31:10 UTC
Based on the linked upstream bug, support for pytest 4 is still “coming,” and the last commit was about a year ago. A commenter points out that comparable functionality is in pytest 6 and later[1].

It looks like roughly the following packages still depend on this one:

- dist-git
- gtk-doc
- m2crypto
- matrix-synapse
- pungi
- python-aws-sam-translator
- python-azure-keyvault-keys
- python-dateparser
- python-moreorless
- python-theano

I wonder if the easier route would be to patch the python-parameterized dependency out of those packages.

[1] https://github.com/wolever/parameterized/issues/34#issuecomment-891900315

Comment 2 Ben Beasley 2022-03-10 17:32:44 UTC
Upstream issue #122 seem to show exactly this error.

https://github.com/wolever/parameterized/issues/122

Comment 3 Miro Hrončok 2022-06-08 11:49:09 UTC
*** Bug 2092233 has been marked as a duplicate of this bug. ***

Comment 4 Miro Hrončok 2022-06-08 11:53:30 UTC
Ok, this now blocks the Python 3.11 rebuild: parameterized -> pungi -> bodhi -> fedpkg.

Updating to 0.8.1 indeed does not fix this and only changes the test name that fails, as reported in https://github.com/wolever/parameterized/issues/122

As an absolute workaround, we might skip that one test. Ideally, we would get rid of the dependency in the long term.

Comment 5 Miro Hrončok 2022-06-08 12:01:54 UTC
Interestingly, when deselecting the test, the previous test errors instead.

Comment 6 Miro Hrončok 2022-06-08 12:02:27 UTC
Apparently, it's always the last one.

Comment 7 Miro Hrončok 2022-06-08 12:25:54 UTC
That actually makes perfect sense, considering this is in tearDownModule :), sorry for the noise.

Comment 9 Fedora Update System 2022-06-09 10:17:28 UTC
FEDORA-2022-b320e0a5aa has been submitted as an update to Fedora 37. https://bodhi.fedoraproject.org/updates/FEDORA-2022-b320e0a5aa

Comment 10 Fedora Update System 2022-06-09 10:32:46 UTC
FEDORA-2022-b320e0a5aa has been pushed to the Fedora 37 stable repository.
If problem still persists, please make note of it in this bug report.