Author: Antonio Cuni <anto.c...@gmail.com>
Branch: py3k
Changeset: r53005:49869aab11b9
Date: 2012-02-28 23:28 +0100
http://bitbucket.org/pypy/pypy/changeset/49869aab11b9/

Log:    __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

diff --git a/pypy/objspace/test/test_descroperation.py 
b/pypy/objspace/test/test_descroperation.py
--- a/pypy/objspace/test/test_descroperation.py
+++ b/pypy/objspace/test/test_descroperation.py
@@ -280,17 +280,10 @@
                 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())
_______________________________________________
pypy-commit mailing list
pypy-commit@python.org
http://mail.python.org/mailman/listinfo/pypy-commit

Reply via email to