Commits

Antonio Cuni  committed 49869aa Draft

__hex__ and __oct__ has gone in py3k, and we can return only str from __str__ and __repr__ (instead of e.g. str and unicode in py2). Adapt this test, which is now very simple

  • Participants
  • Parent commits 390d9fc
  • Branches py3k

Comments (0)

Files changed (1)

File pypy/objspace/test/test_descroperation.py

                 return answer * 2
             def __repr__(self):
                 return answer * 3
-            def __hex__(self):
-                return answer * 4
-            def __oct__(self):
-                return answer * 5
 
-        for operate, n in [(str, 2), (repr, 3), (hex, 4), (oct, 5)]:
+        for operate, n in [(str, 2), (repr, 3)]:
             answer = "hello"
             assert operate(A()) == "hello" * n
-            if operate not in (hex, oct):
-                answer = u"world"
-                assert operate(A()) == "world" * n
             assert type(operate(A())) is str
             answer = 42
             raises(TypeError, operate, A())