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/f09baf54 Tree: http://git-wip-us.apache.org/repos/asf/tinkerpop/tree/f09baf54 Diff: http://git-wip-us.apache.org/repos/asf/tinkerpop/diff/f09baf54 Branch: refs/heads/TINKERPOP-1599 Commit: f09baf54ee8ac56eb7448ec3cfc4e73459bcdb39 Parents: 5debb59 Author: davebshow <[email protected]> Authored: Tue Jan 31 10:43:59 2017 -0500 Committer: davebshow <[email protected]> Committed: Wed Feb 15 13:22:01 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/f09baf54/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():
