home *** CD-ROM | disk | FTP | other *** search
/ H4CK3R 14 / hacker14.iso / programacao / pythonwin / python.exe / TEST_STR.PY < prev    next >
Encoding:
Python Source  |  2003-05-01  |  604 b   |  26 lines

  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.     ):
  10.  
  11.     type2test = str
  12.  
  13.     # We don't need to propagate to str
  14.     def fixtype(self, obj):
  15.         return obj
  16.  
  17.     def test_formatting(self):
  18.         string_tests.MixinStrUnicodeUserStringTest.test_formatting(self)
  19.         self.assertRaises(OverflowError, '%c'.__mod__, 0x1234)
  20.  
  21. def test_main():
  22.     test_support.run_unittest(StrTest)
  23.  
  24. if __name__ == "__main__":
  25.     test_main()
  26.