mirror of
https://github.com/python/cpython.git
synced 2025-08-03 16:39:00 +00:00
gh-84461: Skip dtrace/network tests that are enabled by -u all (GH-93473)
(cherry picked from commit 1a8a0ddb1c
)
Co-authored-by: Christian Heimes <christian@python.org>
This commit is contained in:
parent
fae93ab163
commit
e4113be63c
2 changed files with 7 additions and 0 deletions
|
@ -304,6 +304,8 @@ def requires(resource, msg=None):
|
|||
if msg is None:
|
||||
msg = "Use of the %r resource not enabled" % resource
|
||||
raise ResourceDenied(msg)
|
||||
if resource in {"network", "urlfetch"} and not has_socket_support:
|
||||
raise ResourceDenied("No socket support")
|
||||
if resource == 'gui' and not _is_gui_available():
|
||||
raise ResourceDenied(_is_gui_available.reason)
|
||||
|
||||
|
|
|
@ -6,9 +6,14 @@ import sys
|
|||
import types
|
||||
import unittest
|
||||
|
||||
from test import support
|
||||
from test.support import findfile
|
||||
|
||||
|
||||
if not support.has_subprocess_support:
|
||||
raise unittest.SkipTest("test module requires subprocess")
|
||||
|
||||
|
||||
def abspath(filename):
|
||||
return os.path.abspath(findfile(filename, subdir="dtracedata"))
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue