Author: Manuel Jacob <[email protected]>
Branch: py3.3
Changeset: r76174:7be778a7332a
Date: 2015-02-27 16:21 +0100
http://bitbucket.org/pypy/pypy/changeset/7be778a7332a/

Log:    Mark parts of this test as an implementation detail. As it turned
        out after a short discussion on the issue tracker, this test
        deliberately checks exactly the wrong behaviour.

diff --git a/lib-python/3/test/test_index.py b/lib-python/3/test/test_index.py
--- a/lib-python/3/test/test_index.py
+++ b/lib-python/3/test/test_index.py
@@ -66,7 +66,10 @@
         direct_index = my_int.__index__()
         operator_index = operator.index(my_int)
         self.assertEqual(direct_index, 8)
-        self.assertEqual(operator_index, 7)
+        if support.check_impl_detail():
+            self.assertEqual(operator_index, 7)
+        else:
+            self.assertEqual(operator_index, 8)
         # Both results should be of exact type int.
         self.assertIs(type(direct_index), int)
         #self.assertIs(type(operator_index), int)
@@ -86,7 +89,10 @@
 
         bad_int = BadInt2()
         n = operator.index(bad_int)
-        self.assertEqual(n, 0)
+        if support.check_impl_detail():
+            self.assertEqual(n, 0)
+        else:
+            self.assertEqual(n, 1)
 
 
 class SeqTestCase:
_______________________________________________
pypy-commit mailing list
[email protected]
https://mail.python.org/mailman/listinfo/pypy-commit

Reply via email to