Philip Jenvey  committed 7373802

fix cpython impl detail

  • Participants
  • Parent commits a45b0a6
  • Branches py3k

Comments (0)

Files changed (1)

File lib-python/3/test/

 Common tests shared by test_str, test_unicode, test_userstring and test_string.
+import operator
 import unittest, string, sys, struct
 from test import support
 from collections import UserList
         self.checkequal('abc', 'abc', '__mul__', 1)
         self.checkequal('abcabcabc', 'abc', '__mul__', 3)
         self.checkraises(TypeError, 'abc', '__mul__')
-        self.checkraises(TypeError, 'abc', '__mul__', '')
+        self.checkraises(TypeError, operator.mul, 'abc', '')
         # XXX: on a 64-bit system, this doesn't raise an overflow error,
         # but either raises a MemoryError, or succeeds (if you have 54TiB)
         #self.checkraises(OverflowError, 10000*'abc', '__mul__', 2000000000)