[pypy-svn] r58773 - pypy/branch/2.5-merge/pypy/module/operator/test

jlg at codespeak.net jlg at codespeak.net
Tue Oct 7 17:33:51 CEST 2008


Author: jlg
Date: Tue Oct  7 17:33:51 2008
New Revision: 58773

Modified:
   pypy/branch/2.5-merge/pypy/module/operator/test/test_operator.py
Log:
repeat() supports only sequence types

Modified: pypy/branch/2.5-merge/pypy/module/operator/test/test_operator.py
==============================================================================
--- pypy/branch/2.5-merge/pypy/module/operator/test/test_operator.py	(original)
+++ pypy/branch/2.5-merge/pypy/module/operator/test/test_operator.py	Tue Oct  7 17:33:51 2008
@@ -103,6 +103,8 @@
             def __rmul__(self, other):
                 return other * self.lst
 
+        import operator
+
         a = range(3)
         raises(TypeError, operator.repeat)
         raises(TypeError, operator.repeat, a, None)
@@ -125,5 +127,5 @@
         assert operator.repeat(a, 2) == [4, 5, 6, 4, 5, 6]
         assert operator.repeat(a, 1) == [4, 5, 6]
         assert operator.repeat(a, 0) == []
-        raises(TypeError, operator.repeat, 6, 7
+        raises(TypeError, operator.repeat, 6, 7)
 



More information about the Pypy-commit mailing list