Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

gh-116303: Skip test module dependent tests if test modules are disabled#116307

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to ourterms of service andprivacy statement. We’ll occasionally send you account related emails.

Already on GitHub?Sign in to your account

Closed
Closed
Show file tree
Hide file tree
Changes from1 commit
Commits
Show all changes
40 commits
Select commitHold shift + click to select a range
9b3f0f7
gh-116303: Skip some sqlite3 tests if testcapi is unavailable
erlend-aaslandMar 4, 2024
0f6f74e
Skip more tests
erlend-aaslandMar 4, 2024
2f750c3
Split up sqlite3 tests
erlend-aaslandMar 4, 2024
7c4477d
Amend previous commit
erlend-aaslandMar 4, 2024
a9c6f62
Pull in main
erlend-aaslandMar 4, 2024
cdc6df4
Use import_helper iso. requires_limited_api
erlend-aaslandMar 5, 2024
d05dcd7
More skips
erlend-aaslandMar 5, 2024
cb7cff4
Fix gc and weakref tests
erlend-aaslandMar 5, 2024
ad5e3b6
Remove local debug stuff
erlend-aaslandMar 5, 2024
cdb8bf4
Fix test_os
erlend-aaslandMar 5, 2024
e4a30b0
Fixup stable_abi.py
erlend-aaslandMar 5, 2024
fabb007
Fixup run_in_subinterp
erlend-aaslandMar 5, 2024
c51dafa
Fixup test_call
erlend-aaslandMar 5, 2024
c3f9c99
Fixup test_audit
erlend-aaslandMar 5, 2024
fde9548
Fix some _testsinglephase issues
erlend-aaslandMar 5, 2024
ea72ced
Address review: use setUpClass in test_call; don't skip everything
erlend-aaslandMar 5, 2024
628896c
Address review: no need to skip in tearDown
erlend-aaslandMar 5, 2024
88c6739
Address review: check import at the top of test_threading.test_frame_…
erlend-aaslandMar 5, 2024
c02cd6f
Fixup some test.support helpers
erlend-aaslandMar 5, 2024
d49532b
Fixup test_coroutines
erlend-aaslandMar 5, 2024
2427111
Fixup test_threading
erlend-aaslandMar 5, 2024
25d0999
Fixup test_repl
erlend-aaslandMar 5, 2024
bdd8cff
Fixup test_monitoring
erlend-aaslandMar 5, 2024
ee9fa51
Amend test_embed
erlend-aaslandMar 5, 2024
a47c5ff
Amend test_audit
erlend-aaslandMar 5, 2024
d84a5c4
Fix test_socket
erlend-aaslandMar 5, 2024
e877ffb
Resolve test_exceptions nicer
erlend-aaslandMar 5, 2024
1ec0c66
Merge branch 'main' into sqlite/testcapi
erlend-aaslandMar 5, 2024
afa58a9
Use import_helper in test_importlib
erlend-aaslandMar 5, 2024
760c6cb
Fixup test_embed
erlend-aaslandMar 5, 2024
d7f060a
Pull in main
erlend-aaslandMar 5, 2024
a1106b7
Revert spurious docs change
erlend-aaslandMar 5, 2024
db45852
Workaround: use a different test module name in test_module_resources
erlend-aaslandMar 5, 2024
ccd8bea
gh-116307: Create a new import helper 'isolated modules' and use that…
jaracoMar 6, 2024
f80f75e
Merge branch 'main' into sqlite/testcapi
erlend-aaslandMar 6, 2024
39d135d
Revert "Workaround: use a different test module name in test_module_r…
erlend-aaslandMar 6, 2024
13c4829
Revert another spurious test_importlib change
erlend-aaslandMar 6, 2024
31e19a7
Fix test_embed
erlend-aaslandMar 7, 2024
45e0586
Pull in main
erlend-aaslandMar 7, 2024
a148fb5
Remove useless import from test_embed
erlend-aaslandMar 7, 2024
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
PrevPrevious commit
NextNext commit
Skip more tests
- Lib/test/support/__init__.py- Lib/test/test_audit.py- Lib/test/test_gdb/test_misc.py- Lib/test/test_inspect/test_inspect.py- Lib/test/test_pydoc/test_pydoc.py
  • Loading branch information
@erlend-aasland
erlend-aasland committedMar 4, 2024
commit0f6f74e16def47c4dc144d5e251e3c6e5b5f1e2e
1 change: 1 addition & 0 deletionsLib/test/support/__init__.py
View file
Open in desktop
Original file line numberDiff line numberDiff line change
Expand Up@@ -1698,6 +1698,7 @@ def patch_list(orig):
orig[:] = saved


@requires_limited_api
def run_in_subinterp(code):
"""
Run code in a subinterpreter. Raise unittest.SkipTest if the tracemalloc
Expand Down
2 changes: 2 additions & 0 deletionsLib/test/test_audit.py
View file
Open in desktop
Original file line numberDiff line numberDiff line change
Expand Up@@ -7,6 +7,7 @@
from test import support
from test.support import import_helper
from test.support import os_helper
from test.support import requires_limited_api


if not hasattr(sys, "addaudithook") or not hasattr(sys, "audit"):
Expand DownExpand Up@@ -88,6 +89,7 @@ def test_excepthook(self):
[("sys.excepthook", " ", "RuntimeError('fatal-error')")], events
)

@requires_limited_api
def test_unraisablehook(self):
returncode, events, stderr = self.run_python("test_unraisablehook")
if returncode:
Expand Down
6 changes: 5 additions & 1 deletionLib/test/test_gdb/test_misc.py
View file
Open in desktop
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
import re
import unittest
from test.support import python_is_optimized
from test.support import python_is_optimized, requires_limited_api

from .util import run_gdb, setup_module, DebuggerTests, SAMPLE_SCRIPT

Expand DownExpand Up@@ -85,6 +85,7 @@ def baz(*args):


class StackNavigationTests(DebuggerTests):
@requires_limited_api
@unittest.skipUnless(HAS_PYUP_PYDOWN, "test requires py-up/py-down commands")
@unittest.skipIf(python_is_optimized(),
"Python was compiled with optimizations")
Expand DownExpand Up@@ -114,6 +115,7 @@ def test_up_at_top(self):
self.assertEndsWith(bt,
'Unable to find an older python frame\n')

@requires_limited_api
@unittest.skipUnless(HAS_PYUP_PYDOWN, "test requires py-up/py-down commands")
@unittest.skipIf(python_is_optimized(),
"Python was compiled with optimizations")
Expand All@@ -129,6 +131,7 @@ def test_up_then_down(self):
$''')

class PyPrintTests(DebuggerTests):
@requires_limited_api
@unittest.skipIf(python_is_optimized(),
"Python was compiled with optimizations")
def test_basic_command(self):
Expand All@@ -138,6 +141,7 @@ def test_basic_command(self):
self.assertMultilineMatches(bt,
r".*\nlocal 'args' = \(1, 2, 3\)\n.*")

@requires_limited_api
@unittest.skipIf(python_is_optimized(),
"Python was compiled with optimizations")
@unittest.skipUnless(HAS_PYUP_PYDOWN, "test requires py-up/py-down commands")
Expand Down
12 changes: 10 additions & 2 deletionsLib/test/test_inspect/test_inspect.py
View file
Open in desktop
Original file line numberDiff line numberDiff line change
Expand Up@@ -32,7 +32,7 @@
except ImportError:
ThreadPoolExecutor = None

from test.support import cpython_only
from test.support import cpython_only, requires_limited_api
from test.support import MISSING_C_DOCSTRINGS, ALWAYS_EQ
from test.support.import_helper import DirsOnSysPath, ready_to_import
from test.support.os_helper import TESTFN
Expand DownExpand Up@@ -668,7 +668,10 @@ def test_cleandoc(self):

@cpython_only
def test_c_cleandoc(self):
import _testinternalcapi
try:
import _testinternalcapi
except ImportError:
return unittest.skip("requires _testinternalcapi")
func = _testinternalcapi.compiler_cleandoc
for i, (input, expected) in enumerate(self.cleandoc_testdata):
with self.subTest(i=i):
Expand DownExpand Up@@ -1200,6 +1203,7 @@ def test_getfullargspec_builtin_methods(self):
@cpython_only
@unittest.skipIf(MISSING_C_DOCSTRINGS,
"Signature information for builtins requires docstrings")
@requires_limited_api
def test_getfullargspec_builtin_func(self):
import _testcapi
builtin = _testcapi.docstring_with_signature_with_defaults
Expand All@@ -1209,6 +1213,7 @@ def test_getfullargspec_builtin_func(self):
@cpython_only
@unittest.skipIf(MISSING_C_DOCSTRINGS,
"Signature information for builtins requires docstrings")
@requires_limited_api
def test_getfullargspec_builtin_func_no_signature(self):
import _testcapi
builtin = _testcapi.docstring_no_signature
Expand DownExpand Up@@ -2870,6 +2875,7 @@ def test_staticmethod(*args): # NOQA
@cpython_only
@unittest.skipIf(MISSING_C_DOCSTRINGS,
"Signature information for builtins requires docstrings")
@requires_limited_api
def test_signature_on_builtins(self):
import _testcapi

Expand DownExpand Up@@ -2951,6 +2957,7 @@ class ThisWorksNow:
@cpython_only
@unittest.skipIf(MISSING_C_DOCSTRINGS,
"Signature information for builtins requires docstrings")
@requires_limited_api
def test_signature_on_decorated_builtins(self):
import _testcapi
func = _testcapi.docstring_with_signature_with_defaults
Expand All@@ -2972,6 +2979,7 @@ def wrapper_like(*args, **kwargs) -> int: pass
inspect.signature(wrapper_like))

@cpython_only
@requires_limited_api
def test_signature_on_builtins_no_signature(self):
import _testcapi
with self.assertRaisesRegex(ValueError,
Expand Down
6 changes: 6 additions & 0 deletionsLib/test/test_pydoc/test_pydoc.py
View file
Open in desktop
Original file line numberDiff line numberDiff line change
Expand Up@@ -1371,6 +1371,7 @@ def test_bound_builtin_classmethod_o(self):

@support.cpython_only
@requires_docstrings
@support.requires_limited_api
def test_module_level_callable_unrepresentable_default(self):
import _testcapi
builtin = _testcapi.func_with_unrepresentable_signature
Expand All@@ -1379,6 +1380,7 @@ def test_module_level_callable_unrepresentable_default(self):

@support.cpython_only
@requires_docstrings
@support.requires_limited_api
def test_builtin_staticmethod_unrepresentable_default(self):
self.assertEqual(self._get_summary_line(str.maketrans),
"maketrans(x, y=<unrepresentable>, z=<unrepresentable>, /)")
Expand All@@ -1389,6 +1391,7 @@ def test_builtin_staticmethod_unrepresentable_default(self):

@support.cpython_only
@requires_docstrings
@support.requires_limited_api
def test_unbound_builtin_method_unrepresentable_default(self):
self.assertEqual(self._get_summary_line(dict.pop),
"pop(self, key, default=<unrepresentable>, /) "
Expand All@@ -1401,6 +1404,7 @@ def test_unbound_builtin_method_unrepresentable_default(self):

@support.cpython_only
@requires_docstrings
@support.requires_limited_api
def test_bound_builtin_method_unrepresentable_default(self):
self.assertEqual(self._get_summary_line({}.pop),
"pop(key, default=<unrepresentable>, /) "
Expand All@@ -1413,6 +1417,7 @@ def test_bound_builtin_method_unrepresentable_default(self):

@support.cpython_only
@requires_docstrings
@support.requires_limited_api
def test_unbound_builtin_classmethod_unrepresentable_default(self):
import _testcapi
cls = _testcapi.DocStringUnrepresentableSignatureTest
Expand All@@ -1423,6 +1428,7 @@ def test_unbound_builtin_classmethod_unrepresentable_default(self):

@support.cpython_only
@requires_docstrings
@support.requires_limited_api
def test_bound_builtin_classmethod_unrepresentable_default(self):
import _testcapi
cls = _testcapi.DocStringUnrepresentableSignatureTest
Expand Down

[8]ページ先頭

©2009-2025 Movatter.jp