cpython: 50424a903593 (original) (raw)

Mercurial > cpython

changeset 106020:50424a903593 3.6

Fix unittest.mock._Call: don't ignore name Issue #28961: Fix unittest.mock._Call helper: don't ignore the name parameter anymore. Patch written by Jiajun Huang. [#28961]

Victor Stinner victor.stinner@gmail.com
date Fri, 06 Jan 2017 18:15:51 +0100
parents b14a1e81c34a
children 7a9b8e9a60b8 f8e24a0a1124
files Lib/unittest/mock.py Lib/unittest/test/testmock/testhelpers.py Misc/NEWS
diffstat 3 files changed, 18 insertions(+), 2 deletions(-)[+] [-] Lib/unittest/mock.py 3 Lib/unittest/test/testmock/testhelpers.py 14 Misc/NEWS 3

line wrap: on

line diff

--- a/Lib/unittest/mock.py +++ b/Lib/unittest/mock.py @@ -1961,9 +1961,8 @@ class _Call(tuple): If the _Call has no name then it will match any name. """

--- a/Lib/unittest/test/testmock/testhelpers.py +++ b/Lib/unittest/test/testmock/testhelpers.py @@ -306,6 +306,20 @@ class CallTest(unittest.TestCase): other_args = _Call(((1, 2), {'a': 3})) self.assertEqual(args, other_args)

+ class SpecSignatureTest(unittest.TestCase):

--- a/Misc/NEWS +++ b/Misc/NEWS @@ -42,6 +42,9 @@ Core and Builtins Library ------- +- Issue #28961: Fix unittest.mock._Call helper: don't ignore the name parameter