Skip to content

Commit 1a8a0dd

Browse files
authored
pythongh-84461: Skip dtrace/network tests that are enabled by -u all (pythonGH-93473)
1 parent d52ffc1 commit 1a8a0dd

File tree

2 files changed

+7
-0
lines changed

2 files changed

+7
-0
lines changed

Lib/test/support/__init__.py

+2
Original file line numberDiff line numberDiff line change
@@ -305,6 +305,8 @@ def requires(resource, msg=None):
305305
if msg is None:
306306
msg = "Use of the %r resource not enabled" % resource
307307
raise ResourceDenied(msg)
308+
if resource in {"network", "urlfetch"} and not has_socket_support:
309+
raise ResourceDenied("No socket support")
308310
if resource == 'gui' and not _is_gui_available():
309311
raise ResourceDenied(_is_gui_available.reason)
310312

Lib/test/test_dtrace.py

+5
Original file line numberDiff line numberDiff line change
@@ -6,9 +6,14 @@
66
import types
77
import unittest
88

9+
from test import support
910
from test.support import findfile
1011

1112

13+
if not support.has_subprocess_support:
14+
raise unittest.SkipTest("test module requires subprocess")
15+
16+
1217
def abspath(filename):
1318
return os.path.abspath(findfile(filename, subdir="dtracedata"))
1419

0 commit comments

Comments
 (0)