r47284 - Skip test if inetdtap is not available.

adiroiban-TA+aISz0psMTMxyoc4vAAJOcrHinNvQL0E9HWUfgJXw@public.gmane.org Sun, 17 Apr 2016 03:25:14 -0600 (MDT)
Newsgroups gmane.comp.python.twisted.commits
Message-ID <[email protected]>
Author: adiroiban
Date: Sun Apr 17 03:25:09 2016
New Revision: 47284

Modified:
   branches/runner-rpcserver-deprecation-8123-3/twisted/runner/inetdtap.py
   branches/runner-rpcserver-deprecation-8123-3/twisted/runner/test/test_inetdtap.py

Log:
Skip test if inetdtap is not available.

Modified: branches/runner-rpcserver-deprecation-8123-3/twisted/runner/inetdtap.py
==============================================================================
--- branches/runner-rpcserver-deprecation-8123-3/twisted/runner/inetdtap.py	(original)
+++ branches/runner-rpcserver-deprecation-8123-3/twisted/runner/inetdtap.py	Sun Apr 17 03:25:09 2016
@@ -10,7 +10,7 @@
 This is a useful thing as a "networking swiss army knife" tool, like netcat.
 """
 
-import os, pwd, grp, socket
+import pwd, grp, socket
 
 from twisted.runner import inetd, inetdconf
 from twisted.python import log, usage

Modified: branches/runner-rpcserver-deprecation-8123-3/twisted/runner/test/test_inetdtap.py
==============================================================================
--- branches/runner-rpcserver-deprecation-8123-3/twisted/runner/test/test_inetdtap.py	(original)
+++ branches/runner-rpcserver-deprecation-8123-3/twisted/runner/test/test_inetdtap.py	Sun Apr 17 03:25:09 2016
@@ -5,14 +5,21 @@
 Tests for implementations of L{inetdtap}.
 """
 
-from twisted.runner import inetdtap
+from twisted.python.reflect import requireModule
 from twisted.trial import unittest
 
+inetdtap = requireModule('twisted.runner.inetdtap')
+inetdtapSkip = None
+if inetdtap is None:
+    inetdtapSkip = 'inetdtap not available'
+
 
 class RPCServerTests(unittest.TestCase):
     """
     Tests for L{inetdtap.RPCServer}
     """
+    if inetdtapSkip:
+        skip = inetdtapSkip
 
     def test_deprecation(self):
         """