mirror of
https://github.com/python/cpython.git
synced 2025-08-25 11:15:02 +00:00
gh-116303: Skip test module dependent tests if test modules are unavailable (#117341)
This commit is contained in:
parent
2ec6bb4111
commit
ea94b3b149
57 changed files with 255 additions and 123 deletions
|
@ -143,9 +143,8 @@ from test.support import (cpython_only,
|
|||
check_impl_detail, requires_debug_ranges,
|
||||
gc_collect)
|
||||
from test.support.script_helper import assert_python_ok
|
||||
from test.support import threading_helper
|
||||
from test.support.bytecode_helper import (BytecodeTestCase,
|
||||
instructions_with_positions)
|
||||
from test.support import threading_helper, import_helper
|
||||
from test.support.bytecode_helper import instructions_with_positions
|
||||
from opcode import opmap, opname
|
||||
COPY_FREE_VARS = opmap['COPY_FREE_VARS']
|
||||
|
||||
|
@ -176,7 +175,7 @@ class CodeTest(unittest.TestCase):
|
|||
|
||||
@cpython_only
|
||||
def test_newempty(self):
|
||||
import _testcapi
|
||||
_testcapi = import_helper.import_module("_testcapi")
|
||||
co = _testcapi.code_newempty("filename", "funcname", 15)
|
||||
self.assertEqual(co.co_filename, "filename")
|
||||
self.assertEqual(co.co_name, "funcname")
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue