Update of /usr/cvs/Public/pygresql/module
In directory druid.net:/tmp/cvs-serv22612/module

Modified Files:
        pg.py pgdb.py test_pg.py 
Log Message:
Minor issues.
To see the diffs for this commit:
   
http://www.druid.net/pygresql/viewcvs.cgi/cvs/pygresql/module/pg.py.diff?r1=1.64&r2=1.65

Index: pg.py
===================================================================
RCS file: /usr/cvs/Public/pygresql/module/pg.py,v
retrieving revision 1.64
retrieving revision 1.65
diff -u -r1.64 -r1.65
--- pg.py       21 Nov 2008 23:38:17 -0000      1.64
+++ pg.py       23 Nov 2008 14:32:18 -0000      1.65
@@ -5,7 +5,7 @@
 # Written by D'Arcy J.M. Cain
 # Improved by Christoph Zwerschke
 #
-# $Id: pg.py,v 1.64 2008/11/21 23:38:17 cito Exp $
+# $Id: pg.py,v 1.65 2008/11/23 14:32:18 cito Exp $
 #
 
 """PyGreSQL classic interface.
@@ -597,8 +597,9 @@
         """Delete an existing row in a database table.
 
         This method deletes the row from a table.
-        It deletes based on the OID munged as described above."""
+        It deletes based on the OID munged as described above.
 
+        """
         # Like update, delete works on the oid.
         # One day we will be testing that the record to be deleted
         # isn't referenced somewhere (or else PostgreSQL will).

   
http://www.druid.net/pygresql/viewcvs.cgi/cvs/pygresql/module/pgdb.py.diff?r1=1.53&r2=1.54

Index: pgdb.py
===================================================================
RCS file: /usr/cvs/Public/pygresql/module/pgdb.py,v
retrieving revision 1.53
retrieving revision 1.54
diff -u -r1.53 -r1.54
--- pgdb.py     23 Nov 2008 13:11:21 -0000      1.53
+++ pgdb.py     23 Nov 2008 14:32:18 -0000      1.54
@@ -4,7 +4,7 @@
 #
 # Written by D'Arcy J.M. Cain
 #
-# $Id: pgdb.py,v 1.53 2008/11/23 13:11:21 cito Exp $
+# $Id: pgdb.py,v 1.54 2008/11/23 14:32:18 cito Exp $
 #
 
 """pgdb - DB-API 2.0 compliant module for PygreSQL.
@@ -204,7 +204,8 @@
         elif hasattr(val, '__pg_repr__'):
             val = val.__pg_repr__()
         else:
-            raise InterfaceError('do not know how to handle type %s' % 
type(val))
+            raise InterfaceError(
+                'do not know how to handle type %s' % type(val))
         return val
 
     def _quoteparams(self, string, params):

   
http://www.druid.net/pygresql/viewcvs.cgi/cvs/pygresql/module/test_pg.py.diff?r1=1.20&r2=1.21

Index: test_pg.py
===================================================================
RCS file: /usr/cvs/Public/pygresql/module/test_pg.py,v
retrieving revision 1.20
retrieving revision 1.21
diff -u -r1.20 -r1.21
--- test_pg.py  23 Nov 2008 14:07:35 -0000      1.20
+++ test_pg.py  23 Nov 2008 14:32:18 -0000      1.21
@@ -4,7 +4,7 @@
 #
 # Written by Christoph Zwerschke
 #
-# $Id: test_pg.py,v 1.20 2008/11/23 14:07:35 cito Exp $
+# $Id: test_pg.py,v 1.21 2008/11/23 14:32:18 cito Exp $
 #
 
 """Test the classic PyGreSQL interface in the pg module.
@@ -172,17 +172,22 @@
         self.assertEqual(f('a B.c'), ['a B', 'c'])
         self.assertEqual(f('"A".b.c'), ['A', 'b', 'c'])
         self.assertEqual(f('"A""B".c'), ['A"B', 'c'])
-        self.assertEqual(f('a.b.c.d.e.f.g'), ['a', 'b', 'c', 'd', 'e', 'f', 
'g'])
-        self.assertEqual(f('"a.b.c.d.e.f".g'), ['a.b.c.d.e.f', 'g'])
-        self.assertEqual(f('a.B.c.D.e.F.g'), ['a', 'b', 'c', 'd', 'e', 'f', 
'g'])
-        self.assertEqual(f('A.b.C.d.E.f.G'), ['a', 'b', 'c', 'd', 'e', 'f', 
'g'])
+        self.assertEqual(f('a.b.c.d.e.f.g'),
+            ['a', 'b', 'c', 'd', 'e', 'f', 'g'])
+        self.assertEqual(f('"a.b.c.d.e.f".g'),
+            ['a.b.c.d.e.f', 'g'])
+        self.assertEqual(f('a.B.c.D.e.F.g'),
+            ['a', 'b', 'c', 'd', 'e', 'f', 'g'])
+        self.assertEqual(f('A.b.C.d.E.f.G'),
+            ['a', 'b', 'c', 'd', 'e', 'f', 'g'])
 
     def testJoinParts(self):
         f = pg._join_parts
         self.assertEqual(f(('a',)), 'a')
         self.assertEqual(f(('a', 'b')), 'a.b')
         self.assertEqual(f(('a', 'b', 'c')), 'a.b.c')
-        self.assertEqual(f(('a', 'b', 'c', 'd', 'e', 'f', 'g')), 
'a.b.c.d.e.f.g')
+        self.assertEqual(f(('a', 'b', 'c', 'd', 'e', 'f', 'g')),
+            'a.b.c.d.e.f.g')
         self.assertEqual(f(('A', 'b')), '"A".b')
         self.assertEqual(f(('a', 'B')), 'a."B"')
         self.assertEqual(f(('a b', 'c')), '"a b".c')
@@ -193,7 +198,8 @@
         self.assertEqual(f(('0_', 'a')), '"0_".a')
         self.assertEqual(f(('_0', 'a')), '_0.a')
         self.assertEqual(f(('_a', 'b')), '_a.b')
-        self.assertEqual(f(('a', 'B', '0', 'c0', 'C0', 'd e', 'f_g', 'h.i', 
'jklm', 'nopq')),
+        self.assertEqual(f(('a', 'B', '0', 'c0', 'C0',
+            'd e', 'f_g', 'h.i', 'jklm', 'nopq')),
             'a."B"."0".c0."C0"."d e".f_g."h.i".jklm.nopq')
 
 
@@ -401,7 +407,7 @@
         self.connection.close()
         try:
             self.connection.reset()
-            fail('Reset should give an error for a closed connection')
+            self.fail('Reset should give an error for a closed connection')
         except Exception:
             pass
         self.assertRaises(pg.InternalError, self.connection.close)
@@ -449,7 +455,7 @@
 
     def testGet3Cols(self):
         q = "select 1,2,3"
-        result = [(1,2,3)]
+        result = [(1, 2, 3)]
         r = self.c.query(q).getresult()
         self.assertEqual(r, result)
 
@@ -758,7 +764,7 @@
         self.db.close()
         try:
             self.db.reset()
-            fail('Reset should give an error for a closed connection')
+            self.fail('Reset should give an error for a closed connection')
         except Exception:
             pass
         self.assertRaises(pg.InternalError, self.db.close)

_______________________________________________
PyGreSQL mailing list
[email protected]
http://mailman.vex.net/mailman/listinfo/pygresql

Reply via email to