diff options
author | Samuel Freilich <sfreilich@google.com> | 2019-09-24 22:04:29 (GMT) |
---|---|---|
committer | Gregory P. Smith <greg@krypto.org> | 2019-09-24 22:04:29 (GMT) |
commit | 2180f6b058effbf49ec819f7cedbe76ddd4b700c (patch) | |
tree | 1f2962f22d5d1cfb38da125e8e3ec2bd200c5ac1 /Lib/unittest/mock.py | |
parent | b5a7a4f0c20717a4c92c371583b5521b83f40f32 (diff) | |
download | cpython-2180f6b058effbf49ec819f7cedbe76ddd4b700c.zip cpython-2180f6b058effbf49ec819f7cedbe76ddd4b700c.tar.gz cpython-2180f6b058effbf49ec819f7cedbe76ddd4b700c.tar.bz2 |
bpo-36871: Avoid duplicated 'Actual:' in assertion message (GH-16361)
Fixes an issue caught after merge of PR 16005.
Tightened test assertions to check the entire assertion message.
Diffstat (limited to 'Lib/unittest/mock.py')
-rw-r--r-- | Lib/unittest/mock.py | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/Lib/unittest/mock.py b/Lib/unittest/mock.py index 7bd11c8..0cd7af6 100644 --- a/Lib/unittest/mock.py +++ b/Lib/unittest/mock.py @@ -939,8 +939,8 @@ class NonCallableMock(Base): for e in expected]) raise AssertionError( f'{problem}\n' - f'Expected: {_CallList(calls)}\n' - f'Actual: {self._calls_repr(prefix="Actual")}' + f'Expected: {_CallList(calls)}' + f'{self._calls_repr(prefix="Actual").rstrip(".")}' ) from cause return |