[DB-SIG] DB API 2.0 Anal Compliance Unit Test for review
Matthew T. Kromer
matt@zope.com
Thu, 13 Feb 2003 12:45:49 -0500
Stuart Bishop wrote:
> I've put together a DB API 2.0 compliance test case, currently
> weighing in at 586 lines. It tests all behaviour described in the
> spec, except for the newer 'Optional Additions' section (which may be
> added in the future). I'd like to get this right so I can enforce
> compliance in Gadfly, and would be happy for this testcase to end up
> in the SIG area on www.python.org.
>
> http://stuartbishop.net/Software/DBAPI20TestSuite/
Thanks a bunch for doing this Stuart!
I made a couple of changes to DCOracle2 based on getting your test suite
to run ;) only in a few cases did I actually need to fiddle the test
suite itself. Some of the changes were ones Marc-Andre suggested (ie
the column type check), the other was a case where you did a
cur.execute(ddl2) vs cur.execute(self.ddl2). Oracle won't let you
define a VARCHAR column without specifying a width, so I had to override
ddl1, ddl2, samples, and populate. Sadly, samples and populate were
the same, but because populate uses ddl1 I had to override it.
I'll probably plan on shipping future DCOracle2 versions with a test
harness to include your standard test suite.