예제 #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))