mirror of
https://github.com/apple/swift.git
synced 2025-12-21 12:14:44 +01:00
[Python: black] Reformatted the benchmark Python sources using utils/python_format.py.
This commit is contained in:
@@ -78,14 +78,15 @@ class Mock(object):
|
||||
def assert_called_with(self, expected_args):
|
||||
"""Verify that the tested method was called with provided arguments."""
|
||||
expected_args = tuple(expected_args)
|
||||
assert expected_args in self.calls, (
|
||||
'Expected: {0} in Called: {1}'.format(expected_args, self.calls))
|
||||
assert expected_args in self.calls, "Expected: {0} in Called: {1}".format(
|
||||
expected_args, self.calls
|
||||
)
|
||||
|
||||
def assert_called_all_expected(self):
|
||||
"""Verify that all expeced invocations of tested method were called."""
|
||||
assert self.calls == self.expected, (
|
||||
'\nExpected: {0}, \n Called: {1}'.format(
|
||||
self.expected, self.calls))
|
||||
assert self.calls == self.expected, "\nExpected: {0}, \n Called: {1}".format(
|
||||
self.expected, self.calls
|
||||
)
|
||||
|
||||
|
||||
class MockLoggingHandler(logging.Handler):
|
||||
@@ -103,5 +104,9 @@ class MockLoggingHandler(logging.Handler):
|
||||
def reset(self):
|
||||
"""Clear all log messages."""
|
||||
self.messages = {
|
||||
'debug': [], 'info': [], 'warning': [], 'error': [], 'critical': []
|
||||
"debug": [],
|
||||
"info": [],
|
||||
"warning": [],
|
||||
"error": [],
|
||||
"critical": [],
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user