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.
This commit is contained in:
Samuel Freilich 2019-09-24 18:04:29 -04:00 committed by Gregory P. Smith
parent b5a7a4f0c2
commit 2180f6b058
3 changed files with 32 additions and 18 deletions

View file

@ -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