mirror of
https://github.com/python/cpython.git
synced 2025-12-04 00:30:19 +00:00
gh-84461: Skip dtrace/network tests that are enabled by -u all (GH-93473)
This commit is contained in:
parent
d52ffc1d1f
commit
1a8a0ddb1c
2 changed files with 7 additions and 0 deletions
|
|
@ -305,6 +305,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