Author: Armin Rigo <[email protected]>
Branch: 
Changeset: r80327:65422948292c
Date: 2015-10-19 09:11 +0200
http://bitbucket.org/pypy/pypy/changeset/65422948292c/

Log:    Marking these tests as xfail is wrong, because it doesn't always
        fail (and passes are reported as unexpected). Too bad, let's use
        AssertionError in the py.test.raises in this case

diff --git a/rpython/rlib/test/test_rweakkeydict.py 
b/rpython/rlib/test/test_rweakkeydict.py
--- a/rpython/rlib/test/test_rweakkeydict.py
+++ b/rpython/rlib/test/test_rweakkeydict.py
@@ -121,8 +121,6 @@
     f(1)
     interpret(f, [1])
 
[email protected](
-    reason="may fail with AssertionError, depending on annotation order")
 def test_rpython_merge_RWeakKeyDictionary3():
     def g(x):
         if x:
@@ -131,11 +129,10 @@
             d = RWeakKeyDictionary(KY, VX)
         d.set(KX(), VX())
 
-    with py.test.raises(UnionError):
+    # may fail with AssertionError, depending on annotation order
+    with py.test.raises((UnionError, AssertionError)):
         interpret(g, [1])
 
[email protected](
-    reason="may fail with AssertionError, depending on annotation order")
 def test_rpython_merge_RWeakKeyDictionary4():
     def g(x):
         if x:
@@ -144,7 +141,8 @@
             d = RWeakKeyDictionary(KX, VY)
         d.set(KX(), VX())
 
-    with py.test.raises(UnionError):
+    # may fail with AssertionError, depending on annotation order
+    with py.test.raises((UnionError, AssertionError)):
         interpret(g, [1])
 
 @py.test.mark.xfail(reason="not implemented, messy")
_______________________________________________
pypy-commit mailing list
[email protected]
https://mail.python.org/mailman/listinfo/pypy-commit

Reply via email to