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/e6c71143 Tree: http://git-wip-us.apache.org/repos/asf/tinkerpop/tree/e6c71143 Diff: http://git-wip-us.apache.org/repos/asf/tinkerpop/diff/e6c71143 Branch: refs/heads/master Commit: e6c71143d8a3f47955db4d72d691ad981aecb0c6 Parents: 75a7444 Author: davebshow <davebs...@gmail.com> Authored: Tue Jan 31 10:43:59 2017 -0500 Committer: davebshow <davebs...@gmail.com> Committed: Tue Feb 28 10:30:48 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/e6c71143/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():