From: Steve W. <ste...@gs...> - 2002-05-20 20:42:02
|
Gerhard H=E4ring wrote: >=20 > * Steve Waterbury <ste...@gs...> [2002-05-20 09:37 -04= 00]: > > I installed PyPgSQL and ran PgSQLTestCases.py, which gave 29 errors -= - but > > these seem to be problems with the test scripts rather than with > > PyPgSQL itself. All errors came down to 4 methods missing in various= unit > > test scripts: "assertEqual", "assertEquals" [sic -- typo?], > > "failUnlessRaises", and "fail". >=20 > Strange. Which version of Python is this? If it is 2.1 or later, do you > use the included unittest module or did you perhaps overwrite it with a= n > updated or outdated version? I'm using Python 2.2.1 (#1, Apr 18 2002, 01:54:11) and PyUnit=20 1.4.1, which I installed "over" the included one when I saw that=20 the tests were failing. (They failed the same way with the PyUnit=20 that was included in Python 2.2.1.)=20 The version of PgSQLTestCases.py I have is (from the file):=20 PgSQLTestCases.py,v 1.16 2001/10/18 03:17:08 ballie01 Exp > Btw. in the current pyPgSQL release some tests checking the length of > cursor.description fail when you use PostgreSQL 7.2.x. This has been > fixed in the CVS version. That's good to know. I'm using PostgreSQL 7.2. I don't know whether this will help, but here is an edited version of=20 the session: ----------------------------------------------------------------------- [waterbug@beeblebrox test]$ python PgSQLTestCases.py=20 .E.E.E...........E..E.E.E....E.E.E.E.E.E.E.E.....E.E.E.E.E.E.E.E.E..E.E..= .E..E.E Time: 1.011s !!!FAILURES!!! Test Results Run: 51 Failures: 0 Errors: 29 There were 29 errors: 1) __main__.DBAPICompliance.CheckAPILevel Traceback (most recent call last): File "PgSQLTestCases.py", line 81, in CheckAPILevel self.assertEqual(PgSQL.apilevel, '2.0', AttributeError: DBAPICompliance instance has no attribute 'assertEqual' ... <snip> ... 5) __main__.PgSQLTestModuleInterface.CheckPgInt8 Traceback (most recent call last): File "PgSQLTestCases.py", line 196, in CheckPgInt8 self.failUnlessRaises(OverflowError, pow, b, 2) AttributeError: PgSQLTestModuleInterface instance has no attribute 'failU= nlessRaises' ... <snip> ... 29) __main__.PgSQLTestCases.CheckSelectOfNonPrintableString Traceback (most recent call last): File "PgSQLTestCases.py", line 693, in CheckSelectOfNonPrintableString self.fail(msg) AttributeError: PgSQLTestCases instance has no attribute 'fail' ----------------------------------------------------------------------- -- Steve. Stephen C. Waterbury http://misspiggy.gsfc.nasa.gov/people/waterbug.html |