cpython/Lib/test/test_unittest/testmock
Robert Collins 422c4fc855
gh-119600: mock: do not access attributes of original when new_callable is set (#119601)
In order to patch flask.g e.g. as in #84982, that
proxies getattr must not be invoked. For that,
mock must not try to read from the original
object. In some cases that is unavoidable, e.g.
when doing autospec. However, patch("flask.g",
new_callable=MagicMock) should be entirely safe.
2024-06-11 06:41:12 +01:00
..
__init__.py
__main__.py
support.py gh-119600: mock: do not access attributes of original when new_callable is set (#119601) 2024-06-11 06:41:12 +01:00
testasync.py gh-106300: Improve assertRaises(Exception) usages in tests (GH-106302) 2023-07-07 13:42:40 -07:00
testcallable.py
testhelpers.py gh-102978: Fix mock.patch function signatures for class and staticmethod decorators (#103228) 2023-04-13 08:37:57 +01:00
testmagicmethods.py
testmock.py gh-90848: Fixed create_autospec ignoring configure_mock style kwargs (#118163) 2024-05-02 18:36:35 +01:00
testpatch.py gh-119600: mock: do not access attributes of original when new_callable is set (#119601) 2024-06-11 06:41:12 +01:00
testsealable.py Fix mock code coverage. (#100580) 2022-12-28 12:36:26 +00:00
testsentinel.py
testthreadingmock.py gh-109653: Remove unused imports in the Lib/ directory (#109803) 2023-09-24 15:07:23 +01:00
testwith.py bpo-44185: Added close() to mock_open __exit__ (#26902) 2023-06-11 19:51:21 +01:00