fixtures should test for subclasses of OSError (ConnectionError, 
ConnectionRefusedError etc.)


Project: http://git-wip-us.apache.org/repos/asf/tinkerpop/repo
Commit: http://git-wip-us.apache.org/repos/asf/tinkerpop/commit/5299460b
Tree: http://git-wip-us.apache.org/repos/asf/tinkerpop/tree/5299460b
Diff: http://git-wip-us.apache.org/repos/asf/tinkerpop/diff/5299460b

Branch: refs/heads/TINKERPOP-1599
Commit: 5299460b214044dca479e3b48e8a08a9651e1c2e
Parents: 3605115
Author: davebshow <[email protected]>
Authored: Tue Jan 31 10:43:59 2017 -0500
Committer: davebshow <[email protected]>
Committed: Wed Feb 15 18:28:20 2017 -0500

----------------------------------------------------------------------
 gremlin-python/src/main/jython/tests/conftest.py | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/tinkerpop/blob/5299460b/gremlin-python/src/main/jython/tests/conftest.py
----------------------------------------------------------------------
diff --git a/gremlin-python/src/main/jython/tests/conftest.py 
b/gremlin-python/src/main/jython/tests/conftest.py
index 49779ac..3425266 100644
--- a/gremlin-python/src/main/jython/tests/conftest.py
+++ b/gremlin-python/src/main/jython/tests/conftest.py
@@ -38,7 +38,7 @@ def connection(request):
     try:
         conn = Connection('ws://localhost:45940/gremlin', 'g', protocol,
                           lambda: TornadoTransport(), executor, pool)
-    except:
+    except OSError:
         executor.shutdown()
         pytest.skip('Gremlin Server is not running')
     else:
@@ -52,7 +52,7 @@ def connection(request):
 def client(request):
     try:
         client = Client('ws://localhost:45940/gremlin', 'g')
-    except:
+    except OSError:
         pytest.skip('Gremlin Server is not running')
     else:
         def fin():
@@ -64,7 +64,7 @@ def client(request):
 def remote_connection(request):
     try:
         remote_conn = DriverRemoteConnection('ws://localhost:45940/gremlin', 
'g')
-    except:
+    except OSError:
         pytest.skip('Gremlin Server is not running')
     else:
         def fin():

Reply via email to