def test_exception_formatting_invalid_formatting3(self): ex = bases.ExceptionWithFormatting('%d', 123, 456) self.assertEqual('(\'%d\', 123, 456)', str(ex))
def test_exception_formatting_invalid_formatting1(self): ex = bases.ExceptionWithFormatting('foo %s baz') self.assertEqual('foo %s baz', str(ex))
def test_exception_formatting_invalid_formatting2(self): ex = bases.ExceptionWithFormatting(123) self.assertEqual('(123,)', str(ex))
def test_exception_formatting(self): ex = bases.ExceptionWithFormatting('foo %s baz', 'bar') self.assertEqual('foo bar baz', str(ex))