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

benjamin at codespeak.net benjamin at codespeak.net
Fri Apr 30 00:59:43 CEST 2010


Author: benjamin
Date: Fri Apr 30 00:59:42 2010
New Revision: 74257

Modified:
   pypy/trunk/pypy/module/cpyext/test/test_thread.py
Log:
xfail tests

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	Fri Apr 30 00:59:42 2010
@@ -1,5 +1,7 @@
+import py
 
-import thread, threading
+import thread
+import threading
 
 from pypy.module.thread.ll_thread import allocate_ll_lock
 from pypy.module.cpyext.test.test_api import BaseApiTest
@@ -22,15 +24,15 @@
 
         assert results[0][0] != results[1][0]
 
-
-    # def test_acquire_lock(self, space, api):
-    #     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
-
-
-    # def test_release_lock(self, space, api):
-    #     lock = allocate_ll_lock()
-    #     api.PyThread_acquire_lock(lock, space.w_int(0))
-    #     api.PyThread_release_lock(lock)
-    #     assert api.PyThread_acquire_lock(lock, space.w_int(0)) == 1
+    @py.test.mark.xfail
+    def test_acquire_lock(self, space, api):
+        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):
+        lock = allocate_ll_lock()
+        api.PyThread_acquire_lock(lock, space.w_int(0))
+        api.PyThread_release_lock(lock)
+        assert api.PyThread_acquire_lock(lock, space.w_int(0)) == 1



More information about the Pypy-commit mailing list