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
Last edited by Jelle van der Waa (jelly) - Sunday, 03 September 2023, 16:10 GMT
Task Type Bug Report
Category Packages
Status Closed
Assigned To Filipe Laíns (FFY00)
Architecture All
Severity Low
Priority Normal
Reported Version
Due in Version Undecided
Due Date Undecided
Percent Complete 100%
Votes 0
Private No

Details

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

Additional info:
* Upstream documentation: https://github.com/pytest-dev/pytest-mock/#use-standalone-mock-package

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

Closed by  Jelle van der Waa (jelly)
Sunday, 03 September 2023, 16:10 GMT
Reason for closing:  Won't implement
Additional comments about closing:  It's 2023, python's builtin mock should be used. We are actively trying to get rid of python-mock in our repos.
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...
Comment by Toolybird (Toolybird) - Wednesday, 10 May 2023, 06:45 GMT Comment by Buggy McBugFace (bugbot) - Tuesday, 08 August 2023, 19:11 GMT
This is an automated comment as this bug is open for more then 2 years. Please reply if you still experience this bug otherwise this issue will be closed after 1 month.

Loading...