Vendor pytest-mock via |mach vendor python|
Categories
(Firefox Build System :: General, enhancement)
Tracking
(Not tracked)
People
(Reporter: whimboo, Unassigned)
References
Details
Attachments
(1 obsolete file)
Since bug 1464082 we have pytest vendored in tree now, but for a variety of tests it would be great if we could also switch from the mock package to pytest-mock.
Reporter | ||
Comment 1•6 years ago
|
||
Vendoring the required packages will be done via:
$ ./mach vendor python pytest-mock==1.10.1
Running this locally I can see dependencies on mock
, and pbr
.
Reporter | ||
Comment 2•6 years ago
|
||
Reporter | ||
Comment 3•6 years ago
|
||
Reporter | ||
Comment 4•3 years ago
|
||
Andrew, I stumbled over this 3 years old bug and wonder how our strategy is nowadays. I cannot see pytest anymore under the Python vendored packages. We still have mozbase packages that use pytest for their unit tests. So where is pytest coming from?
Further I don't have a usecase for pytest-mock right now given that I haven't worked on mozbase for quite some time, but maybe it would still be helpful to have?
Comment 5•3 years ago
|
||
The dependency on pytest
is now defined here, we don't need to vendor it anymore (🎉).
If we added pytest-mock
, I'd recommend adding it to that file.
I'll personally give you a 🤷 on pytest-mock
over the builtin unittest.mock
module, but I trust the judgement of you two :)
Comment 6•3 years ago
|
||
Yeah, I don't have any opinions or knowledge on what pytest-mock
offers over the built-in one. So if you want to use it I'd say go ahead and add it (via pypi not via vendor).
Updated•3 years ago
|
Reporter | ||
Comment 7•3 years ago
|
||
Given that there is no need for me right now I'm going to close as incomplete.
Reporter | ||
Updated•3 years ago
|
Description
•