Renders self.mock_calls as a string. Example: "\nCalls: [call(1), call(2)]." If self.mock_calls is empty, an empty string is returned. The output will be truncated if very long.
(self)
| 1098 | |
| 1099 | |
| 1100 | def _calls_repr(self): |
| 1101 | """Renders self.mock_calls as a string. |
| 1102 | |
| 1103 | Example: "\nCalls: [call(1), call(2)]." |
| 1104 | |
| 1105 | If self.mock_calls is empty, an empty string is returned. The |
| 1106 | output will be truncated if very long. |
| 1107 | """ |
| 1108 | if not self.mock_calls: |
| 1109 | return "" |
| 1110 | return f"\nCalls: {safe_repr(self.mock_calls)}." |
| 1111 | |
| 1112 | |
| 1113 | # Denylist for forbidden attribute names in safe mode |
no test coverage detected