Community Packages

Please read this before reporting a bug:

Do NOT report bugs when a package is just outdated, or it is in the AUR. Use the 'flag out of date' link on the package page, or the Mailing List.

REPEAT: Do NOT report bugs for outdated packages!

FS#71066 - [python-pytest-mock] missing dependency python-mock

Attached to Project: Community Packages
Opened by George Rawlinson (rawlinsong) - Monday, 31 May 2021, 01:20 GMT
Task Type Bug Report
Category Packages
Status Assigned
Assigned To Felix Yan (felixonmars)
Architecture All
Severity Low
Priority Normal
Reported Version
Due in Version Undecided
Due Date Undecided
Percent Complete 0%
Votes 0
Private No


Description: If mock_use_standalone_module is set to true in pytest.ini, pytest fails with module not found error.

Additional info:
* Upstream documentation:

Steps to reproduce:
* Set mock_use_standalone_module = true in pytest.ini and watch it all burn down.

Possible solution: Set python-mock as a runtime dependency, OR an optional dependency.
This task depends upon

Comment by Eli Schwartz (eschwartz) - Monday, 31 May 2021, 01:30 GMT
This should be an optdepends at best, but also IMO nothing should ever use mock_use_standalone_module. There's no benefit to it...
Comment by George Rawlinson (rawlinsong) - Monday, 31 May 2021, 02:14 GMT
ansible-test unfortunately does, it’s how I discovered this.
Comment by Eli Schwartz (eschwartz) - Monday, 31 May 2021, 02:29 GMT
Does everything work if you patch it out? :D If so, it may be worth opening an upstream ticket to use the stdlib...