mirror of
https://github.com/python/cpython.git
synced 2025-10-09 08:31:26 +00:00
Issue #20532: Tests which use _testcapi now are marked as CPython only.
This commit is contained in:
parent
fe4ef392d5
commit
5cfc79deae
25 changed files with 239 additions and 106 deletions
|
@ -104,7 +104,7 @@ consts: ('None',)
|
|||
|
||||
import unittest
|
||||
import weakref
|
||||
import _testcapi
|
||||
from test.support import run_doctest, run_unittest, cpython_only
|
||||
|
||||
|
||||
def consts(t):
|
||||
|
@ -126,7 +126,9 @@ def dump(co):
|
|||
|
||||
class CodeTest(unittest.TestCase):
|
||||
|
||||
@cpython_only
|
||||
def test_newempty(self):
|
||||
import _testcapi
|
||||
co = _testcapi.code_newempty("filename", "funcname", 15)
|
||||
self.assertEqual(co.co_filename, "filename")
|
||||
self.assertEqual(co.co_name, "funcname")
|
||||
|
@ -159,7 +161,6 @@ class CodeWeakRefTest(unittest.TestCase):
|
|||
|
||||
|
||||
def test_main(verbose=None):
|
||||
from test.support import run_doctest, run_unittest
|
||||
from test import test_code
|
||||
run_doctest(test_code, verbose)
|
||||
run_unittest(CodeTest, CodeWeakRefTest)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue