Closed NickGoog closed 1 year ago
Hey! Thanks for raising this. Yes, it would be nice to mention this in the documentation, possibly with an example of how Mock.side_effect
can be used to work around it: https://docs.python.org/3/library/unittest.mock.html#unittest.mock.Mock.side_effect
A pull request with updates to the documentation would be very welcome!
@wolever , made the PR! https://github.com/wolever/parameterized/pull/164
Hi, I saw something related in the docs:
https://github.com/wolever/parameterized#exhaustive-usage-examples
Not sure if this deserves a separate mention or a warning in code. Sorry if this is a known issue, and I couldn't find it.
The Problem: “Consumables” (e.g. iterators) declared in non-parameterized decorators that are used by one test case remain consumed for other test cases.
Reproduction:
Output:
We're fine with the workaround but just wanted to raise awareness.
Thanks!