How to reproduce: given that we have one of the following scenarios
def foo():
# do something
or
class MyTestCase(unittest.TestCase):
def foo(self):
# do something
if we run the tests, we should have 0 runing tests, but if we decorate foo() with @patch we'll have 1 test running (and probably failing, depending on the params it expects) because @patch(...) returns a function named patched_test which test runners assume is a runnable test
For some runners it also breaks the feature of running a single test like:
How to reproduce: given that we have one of the following scenarios
or
if we run the tests, we should have 0 runing tests, but if we decorate
foo()
with@patch
we'll have 1 test running (and probably failing, depending on the params it expects) because@patch(...)
returns a function namedpatched_test
which test runners assume is a runnable testFor some runners it also breaks the feature of running a single test like: