Sam Park added the comment:
FWIW I just ran into this today on Ubuntu 18.04 container on GKE
1.21.5-gke.1302 and on a Ubuntu-with-Docker underlying node (if that's
relevant). Applying the monkeypatch solves the issue as well.
--
nosy: +sam
New submission from Sam Park :
The expectation is that the __module__ attribute for a patched function should
persist after patching.
Minimal test case is attached. Simply run pytest in a venv with the files.
Output:
def test_zxc():
with mock.patch.object(mymodule, 'asd', s
Sam Park added the comment:
I'm seeing a similar issue with curly brackets.
from Cookie import BaseCookie
cookie = BaseCookie('asd={"asd"}; my-real-cookie=stuff i care about; blah=blah')
assert 'my-real-cookie' in cookie # False
--
___
Change by Sam Park :
--
nosy: +spark
___
Python tracker
<https://bugs.python.org/issue25228>
___
___
Python-bugs-list mailing list
Unsubscribe:
https://mail.pyth