Initial commit of OpenSPARC T2 architecture model.
[OpenSPARC-T2-SAM] / sam-t2 / devtools / amd64 / lib / python2.4 / test / test_str.py
CommitLineData
920dae64
AT
1import unittest
2from test import test_support, string_tests
3
4
5class 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
22def test_main():
23 test_support.run_unittest(StrTest)
24
25if __name__ == "__main__":
26 test_main()