File tree Expand file tree Collapse file tree 2 files changed +7
-0
lines changed
Expand file tree Collapse file tree 2 files changed +7
-0
lines changed Original file line number Diff line number Diff line change @@ -304,6 +304,8 @@ def requires(resource, msg=None):
304304 if msg is None :
305305 msg = "Use of the %r resource not enabled" % resource
306306 raise ResourceDenied (msg )
307+ if resource in {"network" , "urlfetch" } and not has_socket_support :
308+ raise ResourceDenied ("No socket support" )
307309 if resource == 'gui' and not _is_gui_available ():
308310 raise ResourceDenied (_is_gui_available .reason )
309311
Original file line number Diff line number Diff line change 66import types
77import unittest
88
9+ from test import support
910from test .support import findfile
1011
1112
13+ if not support .has_subprocess_support :
14+ raise unittest .SkipTest ("test module requires subprocess" )
15+
16+
1217def abspath (filename ):
1318 return os .path .abspath (findfile (filename , subdir = "dtracedata" ))
1419
You can’t perform that action at this time.
0 commit comments