[DB-SIG] DB API 2.0 Anal Compliance Unit Test for review

Stuart Bishop zen@shangri-la.dropbear.id.au
Sat, 15 Feb 2003 11:27:19 +1100


On Friday, February 14, 2003, at 04:45  AM, Matthew T. Kromer wrote:

> 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've made self.populate into self._populate(), so changes to self.ddl1 
will propogate.
These changes should no longer be necessary, as I have specified the 
column with
in the DDL.

> I'll probably plan on shipping future DCOracle2 versions with a test 
> harness to include your standard test suite.

No worries :-)

-- 
Stuart Bishop <zen@shangri-la.dropbear.id.au>
http://shangri-la.dropbear.id.au/