Uh oh!
There was an error while loading.Please reload this page.
- Notifications
You must be signed in to change notification settings - Fork33.7k
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
Uh oh!
There was an error while loading.Please reload this page.
Changes fromall commits
9b3f0f70f6f74e2f750c37c4477da9c6f62cdc6df4d05dcd7cb7cff4ad5e3b6cdb8bf4e4a30b0fabb007c51dafac3f9c99fde9548ea72ced628896c88c6739c02cd6fd49532b242711125d0999bdd8cffee9fa51a47c5ffd84a5c4e877ffb1ec0c66afa58a9760c6cbd7f060aa1106b7db45852ccd8beaf80f75e39d135d13c482931e19a745e0586a148fb5File filter
Filter by extension
Conversations
Uh oh!
There was an error while loading.Please reload this page.
Jump to
Uh oh!
There was an error while loading.Please reload this page.
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -508,7 +508,7 @@ def has_no_debug_ranges(): | ||
| try: | ||
| import _testinternalcapi | ||
| except ImportError: | ||
| return unittest.skip("_testinternalcapi required") | ||
| config = _testinternalcapi.get_config() | ||
| return not bool(config['code_debug_ranges']) | ||
Comment on lines +511 to 513 Member There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others.Learn more. Why does it return a boolean (which is not callable) or a function (which always true)? How this helper is supposed to be used? | ||
| @@ -1704,7 +1704,10 @@ def run_in_subinterp(code): | ||
| module is enabled. | ||
| """ | ||
| _check_tracemalloc() | ||
| try: | ||
| import _testcapi | ||
| except ImportError: | ||
| raise unittest.SkipTest("requires _testcapi") | ||
| return _testcapi.run_in_subinterp(code) | ||
| @@ -1714,7 +1717,10 @@ def run_in_subinterp_with_config(code, *, own_gil=None, **config): | ||
| module is enabled. | ||
| """ | ||
| _check_tracemalloc() | ||
| try: | ||
| import _testinternalcapi | ||
| except ImportError: | ||
| raise unittest.SkipTest("requires _testinternalcapi") | ||
| if own_gil is not None: | ||
| assert 'gil' not in config, (own_gil, config) | ||
| config['gil'] = 2 if own_gil else 1 | ||
| @@ -1876,12 +1882,18 @@ def restore(self): | ||
| def with_pymalloc(): | ||
| try: | ||
| import _testcapi | ||
| except ImportError: | ||
| raise unittest.SkipTest("requires _testcapi") | ||
| return _testcapi.WITH_PYMALLOC and not Py_GIL_DISABLED | ||
| def with_mimalloc(): | ||
| try: | ||
| import _testcapi | ||
| except ImportError: | ||
| raise unittest.SkipTest("requires _testcapi") | ||
| return _testcapi.WITH_MIMALLOC | ||
Uh oh!
There was an error while loading.Please reload this page.