Commit | Line | Data |
---|---|---|
920dae64 AT |
1 | import unittest |
2 | from test import test_support, string_tests | |
3 | ||
4 | ||
5 | class StrTest( | |
6 | string_tests.CommonTest, | |
7 | string_tests.MixinStrUnicodeUserStringTest, | |
8 | string_tests.MixinStrUserStringTest, | |
9 | string_tests.MixinStrUnicodeTest, | |
10 | ): | |
11 | ||
12 | type2test = str | |
13 | ||
14 | # We don't need to propagate to str | |
15 | def fixtype(self, obj): | |
16 | return obj | |
17 | ||
18 | def test_formatting(self): | |
19 | string_tests.MixinStrUnicodeUserStringTest.test_formatting(self) | |
20 | self.assertRaises(OverflowError, '%c'.__mod__, 0x1234) | |
21 | ||
22 | def test_main(): | |
23 | test_support.run_unittest(StrTest) | |
24 | ||
25 | if __name__ == "__main__": | |
26 | test_main() |