From 33c2e713c7372ed7c4e7dc62d233d1f3fdc0147e Mon Sep 17 00:00:00 2001 From: Ryan Williams Date: Tue, 15 Feb 2011 17:20:46 -0800 Subject: [PATCH] Postgres tests not failing when postgres not installed. Fixes #78. --- AUTHORS | 1 + tests/patcher_psycopg_test.py | 4 +++- 2 files changed, 4 insertions(+), 1 deletion(-) diff --git a/AUTHORS b/AUTHORS index 8d1d3fd..d0fc56e 100644 --- a/AUTHORS +++ b/AUTHORS @@ -71,3 +71,4 @@ Thanks To * Ruijun Luo, figuring out incorrect openssl import for wrap_ssl (#73) * rfk, patch to get green zmq to respect noblock flag. * Soren Hansen, finding and fixing issue in subprocess (#77) +* Stefano Rivera, making tests pass in absence of postgres (#78) diff --git a/tests/patcher_psycopg_test.py b/tests/patcher_psycopg_test.py index 351ddf6..80988e5 100644 --- a/tests/patcher_psycopg_test.py +++ b/tests/patcher_psycopg_test.py @@ -1,7 +1,8 @@ import os -from tests import patcher_test +from tests import patcher_test, skip_unless from tests import get_database_auth +from tests.db_pool_test import postgres_requirement psycopg_test_file = """ import os @@ -35,6 +36,7 @@ print "done" """ class PatchingPsycopg(patcher_test.ProcessBase): + @skip_unless(postgres_requirement) def test_psycopg_patched(self): if 'PSYCOPG_TEST_DSN' not in os.environ: # construct a non-json dsn for the subprocess