[pypy-svn] r74316 - pypy/trunk/pypy/module/cpyext/test

afa at codespeak.net afa at codespeak.net
Sun May 2 00:10:59 CEST 2010


Author: afa
Date: Sun May  2 00:10:58 2010
New Revision: 74316

Modified:
   pypy/trunk/pypy/module/cpyext/test/test_thread.py
Log:
fix (or xfix?) these tests:
a "xfail" test must stop on an assertion, not raise a random AttributeError.


Modified: pypy/trunk/pypy/module/cpyext/test/test_thread.py
==============================================================================
--- pypy/trunk/pypy/module/cpyext/test/test_thread.py	(original)
+++ pypy/trunk/pypy/module/cpyext/test/test_thread.py	Sun May  2 00:10:58 2010
@@ -26,12 +26,14 @@
 
     @py.test.mark.xfail
     def test_acquire_lock(self, space, api):
+        assert hasattr(api, 'PyThread_acquire_lock')
         lock = allocate_ll_lock()
         assert api.PyThread_acquire_lock(lock, space.w_int(0)) == 1
         assert api.PyThread_acquire_lock(lock, space.w_int(1)) == 0
 
     @py.test.mark.xfail
     def test_release_lock(self, space, api):
+        assert hasattr(api, 'PyThread_acquire_lock')
         lock = allocate_ll_lock()
         api.PyThread_acquire_lock(lock, space.w_int(0))
         api.PyThread_release_lock(lock)



More information about the Pypy-commit mailing list