Skip to content

Commit d45035b

Browse files
committed
Fix formatting of error message in __getattr__ method
1 parent b78e9c0 commit d45035b

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

Lib/unittest/mock.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -700,7 +700,7 @@ def __getattr__(self, name):
700700
if name.startswith(('assert', 'assret', 'asert', 'aseert', 'assrt')) or name in _ATTRIB_DENY_LIST:
701701
raise AttributeError(
702702
f"{name!r} is not a valid assertion. Use a spec "
703-
f"for the mock if {name!r} is meant to be an attribute.")
703+
f"for the mock if {name!r} is meant to be an attribute")
704704

705705
with NonCallableMock._lock:
706706
result = self._mock_children.get(name)

0 commit comments

Comments
 (0)