From 0d47deb1690baaea7d57be2ce022ef474bd4ef0e Mon Sep 17 00:00:00 2001 From: Dane Springmeyer Date: Wed, 13 Aug 2014 09:04:54 -0700 Subject: [PATCH] fix pgraster/postgis logic to skip tests if there is no postgres server running --- tests/python_tests/pgraster_test.py | 2 +- tests/python_tests/postgis_test.py | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/tests/python_tests/pgraster_test.py b/tests/python_tests/pgraster_test.py index 15045dc74..d6e985136 100644 --- a/tests/python_tests/pgraster_test.py +++ b/tests/python_tests/pgraster_test.py @@ -31,7 +31,7 @@ def call(cmd,silent=False): stdin, stderr = Popen(cmd, shell=True, stdout=PIPE, stderr=PIPE).communicate() if not stderr: return stdin.strip() - elif not silent and 'ERROR' in stderr: + elif not silent and 'error' in stderr.lower() or 'could not connect' in stderr.lower(): raise RuntimeError(stderr.strip()) def psql_can_connect(): diff --git a/tests/python_tests/postgis_test.py b/tests/python_tests/postgis_test.py index 0363cc6f8..77f8d7b24 100644 --- a/tests/python_tests/postgis_test.py +++ b/tests/python_tests/postgis_test.py @@ -23,7 +23,7 @@ def call(cmd,silent=False): stdin, stderr = Popen(cmd, shell=True, stdout=PIPE, stderr=PIPE).communicate() if not stderr: return stdin.strip() - elif not silent and not 'NOTICE' in stderr: + elif not silent and 'error' in stderr.lower() or 'could not connect' in stderr.lower(): raise RuntimeError(stderr.strip()) def psql_can_connect():