Author: Brian Kearns <[email protected]>
Branch: 
Changeset: r60700:39876dee7626
Date: 2013-01-29 19:54 -0500
http://bitbucket.org/pypy/pypy/changeset/39876dee7626/

Log:    unskip test_capi.py while adding individual skips for non-
        functioning tests

diff --git a/lib-python/2.7/test/test_capi.py b/lib-python/2.7/test/test_capi.py
--- a/lib-python/2.7/test/test_capi.py
+++ b/lib-python/2.7/test/test_capi.py
@@ -13,6 +13,20 @@
     threading = None
 import _testcapi
 
+skips = []
+if test_support.check_impl_detail(pypy=True):
+    skips += [
+            'test_broken_memoryview',
+            'test_capsule',
+            'test_lazy_hash_inheritance',
+            'test_long_api',
+            'test_longlong_api',
+            'test_null_strings',
+            'test_widechar',
+            'TestThreadState',
+            'TestPendingCalls',
+            ]
+
 @unittest.skipUnless(threading, 'Threading required for this test.')
 class TestPendingCalls(unittest.TestCase):
 
@@ -99,7 +113,7 @@
 def test_main():
 
     for name in dir(_testcapi):
-        if name.startswith('test_'):
+        if name.startswith('test_') and name not in skips:
             test = getattr(_testcapi, name)
             if test_support.verbose:
                 print "internal", name
@@ -126,7 +140,7 @@
             raise test_support.TestFailed, \
                   "Couldn't find main thread correctly in the list"
 
-    if threading:
+    if threading and 'TestThreadState' not in skips:
         import thread
         import time
         TestThreadState()
@@ -134,7 +148,8 @@
         t.start()
         t.join()
 
-    test_support.run_unittest(TestPendingCalls)
+    if 'TestPendingCalls' not in skips:
+        test_support.run_unittest(TestPendingCalls)
 
 if __name__ == "__main__":
     test_main()
diff --git a/lib-python/conftest.py b/lib-python/conftest.py
--- a/lib-python/conftest.py
+++ b/lib-python/conftest.py
@@ -132,7 +132,7 @@
     RegrTest('test_bz2.py', usemodules='bz2'),
     RegrTest('test_calendar.py'),
     RegrTest('test_call.py', core=True),
-    RegrTest('test_capi.py', skip="not applicable"),
+    RegrTest('test_capi.py'),
     RegrTest('test_cd.py'),
     RegrTest('test_cfgparser.py'),
     RegrTest('test_cgi.py'),
_______________________________________________
pypy-commit mailing list
[email protected]
http://mail.python.org/mailman/listinfo/pypy-commit

Reply via email to