Пример #1
0
 def test_exception_formatting_invalid_formatting3(self):
     ex = bases.ExceptionWithFormatting('%d', 123, 456)
     self.assertEqual('(\'%d\', 123, 456)', str(ex))
Пример #2
0
 def test_exception_formatting_invalid_formatting1(self):
     ex = bases.ExceptionWithFormatting('foo %s baz')
     self.assertEqual('foo %s baz', str(ex))
Пример #3
0
 def test_exception_formatting_invalid_formatting2(self):
     ex = bases.ExceptionWithFormatting(123)
     self.assertEqual('(123,)', str(ex))
Пример #4
0
 def test_exception_formatting(self):
     ex = bases.ExceptionWithFormatting('foo %s baz', 'bar')
     self.assertEqual('foo bar baz', str(ex))