cpython/Lib/unittest
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 gh-104835: Remove unittest's deprecated getTestCaseNames, makeSuite, findTestCases (#104836) 2023-05-24 21:16:43 +00:00
__main__.py
_log.py
async_case.py gh-110774: allow setting the Runner(loop_factory=...) from IsolatedAsyncioTestCase (#110776) 2023-10-31 15:03:54 -07:00
case.py GH-70647: Deprecate strptime day of month parsing without a year present to avoid leap-year bugs (GH-117107) 2024-04-03 14:19:49 +02:00
loader.py gh-59215: unittest: restore _top_level_dir at end of discovery (GH-15242) 2024-04-03 16:17:13 +02:00
main.py GH-113661: unittest runner: Don't exit 5 if tests were skipped (#113856) 2024-01-09 19:50:01 +00:00
mock.py gh-119600: mock: do not access attributes of original when new_callable is set (#119601) 2024-06-11 06:41:12 +01:00
result.py gh-113267: Revert "gh-106584: Fix exit code for unittest in Python 3.12 (#106588)" (GH-114470) 2024-02-04 17:27:42 +02:00
runner.py GH-113661: unittest runner: Don't exit 5 if tests were skipped (#113856) 2024-01-09 19:50:01 +00:00
signals.py
suite.py
util.py