pgbouncer/tests.py demands PostgreSQL 8.4

Bug #1036876 reported by Gavin Panella
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
Python PGBouncer
In Progress
Low
Colin Watson

Bug Description

The following diff will get the tests running on Ubuntu with other versions of PostgreSQL (tested with 9.1), but testscenarios probably ought to be used to test against all installed versions.

=== modified file 'pgbouncer/tests.py'
--- pgbouncer/tests.py 2011-10-28 11:45:32 +0000
+++ pgbouncer/tests.py 2012-08-14 21:53:31 +0000
@@ -14,6 +14,7 @@
 # You should have received a copy of the GNU Affero General Public License
 # along with this program. If not, see <http://www.gnu.org/licenses/>.

+import glob
 import os
 import unittest

@@ -26,7 +27,9 @@
 from pgbouncer.fixture import PGBouncerFixture

 # A 'just-works' workaround for Ubuntu not exposing initdb to the main PATH.
-os.environ['PATH'] = os.environ['PATH'] + ':/usr/lib/postgresql/8.4/bin'
+os.environ['PATH'] = os.pathsep.join(
+ os.environ.get('PATH', '').split(os.pathsep) +
+ glob.glob('/usr/lib/postgresql/*/bin'))

 def test_suite():

Related branches

Colin Watson (cjwatson)
Changed in python-pgbouncer:
status: Triaged → In Progress
assignee: nobody → Colin Watson (cjwatson)
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.