bpo-29845: Mark tests that use _testcapi as CPython-only (#711) (#725)

(cherry picked from commit 24c738a9e91b8f46da6166663d8ce7ec18cec784)
diff --git a/Lib/test/test_tracemalloc.py b/Lib/test/test_tracemalloc.py
index 790ab7e..742259b 100644
--- a/Lib/test/test_tracemalloc.py
+++ b/Lib/test/test_tracemalloc.py
@@ -865,6 +865,7 @@
                                   b'number of frames',
                                   stderr)
 
+    @unittest.skipIf(_testcapi is None, 'need _testcapi')
     def test_pymem_alloc0(self):
         # Issue #21639: Check that PyMem_Malloc(0) with tracemalloc enabled
         # does not crash.