[issue27341] mock.patch decorating a generator returns a regular function.

2019-12-13 Thread Karthikeyan Singaravelan
Change by Karthikeyan Singaravelan : -- nosy: +xtreak ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe:

[issue27341] mock.patch decorating a generator returns a regular function.

2016-06-17 Thread Shoshana Berleant
Shoshana Berleant added the comment: I attached a file with 4 tests and the output. nosetests reports that all four tests were executed. In reality, only two tests were executed. -- Added file: http://bugs.python.org/file43443/silentfail.py ___

[issue27341] mock.patch decorating a generator returns a regular function.

2016-06-17 Thread Shoshana Berleant
Shoshana Berleant added the comment: output -- Added file: http://bugs.python.org/file43444/actual.out ___ Python tracker ___

[issue27341] mock.patch decorating a generator returns a regular function.

2016-06-17 Thread Robert Collins
Robert Collins added the comment: There are two related things here. Firstly, the generator's body will run without the patch (because the wrapping function has try: return decorated(..) finally: unpwatch() Secondly, the wrapping function is itself not a generator, and anything that

[issue27341] mock.patch decorating a generator returns a regular function.

2016-06-17 Thread Robert Collins
Robert Collins added the comment: Once fixed in CPython, we'll put the backport in mock, for folk using older Python's. -- versions: -Python 2.7, Python 3.2, Python 3.3, Python 3.4 ___ Python tracker