def assert_format(self, locale, format_string, args, expected=None):
if expected is None:<EOL><INDENT>format_string, args, expected = locale, format_string, args<EOL>locale = None<EOL><DEDENT>if not isinstance(args, tuple):<EOL><INDENT>args = (args,)<EOL><DEDENT>assert self.format(locale, format_string, *args) == expected<EOL>
Asserts that a formatted string is same with expected string.