Commit dd7fd780 authored by Stefan Behnel's avatar Stefan Behnel
parent 66690e7c
...@@ -1470,19 +1470,19 @@ class UnicodeTest(CommonTest, ...@@ -1470,19 +1470,19 @@ class UnicodeTest(CommonTest,
class Str(str, enum.Enum): class Str(str, enum.Enum):
ABC = 'abc' ABC = 'abc'
# Testing Unicode formatting strings... # Testing Unicode formatting strings...
self.assertEqual("%s, %s" % (Str.ABC, Str.ABC), self.assertEqual(("%s, %s" % (Str.ABC, Str.ABC)).replace("Str.", ""),
'Str.ABC, Str.ABC') 'ABC, ABC')
self.assertEqual("%s, %s, %d, %i, %u, %f, %5.2f" % self.assertEqual(("%s, %s, %d, %i, %u, %f, %5.2f" %
(Str.ABC, Str.ABC, (Str.ABC, Str.ABC,
Int.IDES, Int.IDES, Int.IDES, Int.IDES, Int.IDES, Int.IDES,
Float.PI, Float.PI), Float.PI, Float.PI)).replace("Str.", ""),
'Str.ABC, Str.ABC, 15, 15, 15, 3.141593, 3.14') 'ABC, ABC, 15, 15, 15, 3.141593, 3.14')
# formatting jobs delegated from the string implementation: # formatting jobs delegated from the string implementation:
self.assertEqual('...%(foo)s...' % {'foo':Str.ABC}, self.assertEqual(('...%(foo)s...' % {'foo':Str.ABC}).replace("Str.", ""),
'...Str.ABC...') '...ABC...')
self.assertEqual('...%(foo)s...' % {'foo':Int.IDES}, self.assertEqual(('...%(foo)s...' % {'foo':Int.IDES}).replace("Int.", ""),
'...Int.IDES...') '...IDES...')
self.assertEqual('...%(foo)i...' % {'foo':Int.IDES}, self.assertEqual('...%(foo)i...' % {'foo':Int.IDES},
'...15...') '...15...')
self.assertEqual('...%(foo)d...' % {'foo':Int.IDES}, self.assertEqual('...%(foo)d...' % {'foo':Int.IDES},
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment