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)
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"))