Sangyun_LEE
0c369d6cb8
Update Lib/test/test_unittest/testmock/testmock.py: fix typo RuntimError to RuntimeError ( #108847 )
2023-09-03 22:19:49 +01:00
Nikita Sobolev
219f01b185
gh-83403: Test `parent` param in `Mock.__init__` ( #103630 )
2023-05-30 08:36:22 +01:00
melanie witt
2e0931046d
gh-85934: Use getattr_static when adding mock spec ( #22209 )
...
Co-authored-by: Terry Jan Reedy <tjreedy@udel.edu>
Co-authored-by: Oleg Iarygin <oleg@arhadthedev.net>
2023-05-23 17:10:34 -06:00
Chris Withers
4e544eafcb
fix up mock tests coverage ( #100874 )
2023-01-09 10:08:56 +00:00
Christian Klein
1d4d677d1c
gh-100690: Raise an AttributeError when the assert_ prefix is forgotten when using Mock ( #100691 )
...
Mock objects which are not unsafe will now raise an AttributeError when accessing an
attribute that matches the name of an assertion but without the prefix `assert_`, e.g. accessing `called_once` instead of `assert_called_once`.
This is in addition to this already happening for accessing attributes with prefixes assert, assret, asert, aseert, and assrt.
2023-01-06 18:38:50 +00:00
Christian Klein
7f1eefc6f4
gh-100739: Respect mock spec when checking for unsafe prefixes ( #100740 )
...
Co-authored-by: Nikita Sobolev <mail@sobolevn.me>
2023-01-04 22:31:29 +00:00
Victor Stinner
c735d54534
gh-93839: Move Lib/unttest/test/ to Lib/test/test_unittest/ ( #94043 )
...
* Move Lib/unittest/test/ to Lib/test/test_unittest/
* Remove Lib/test/test_unittest.py
* Replace unittest.test with test.test_unittest
* Remove unittest.load_tests()
* Rewrite unittest __init__.py and __main__.py
* Update build system, CODEOWNERS, and wasm_assets.py
2022-06-21 10:27:59 +02:00