Commit Graph

5 Commits

Author SHA1 Message Date
Daniele Varrazzo
296caa4556 More tests tweaks
Named cursors on old server versions have a different prefetch behaviour.
This has hidden me the supported range of the 24:00 time format.
Let's have another go at full testing...
2015-02-08 12:51:36 +00:00
Daniele Varrazzo
1b48033345 Don't try to close the server cursor in error state
`close()` is implicitly called by `__exit__()`, so an exit on error
would run a query on a inerr connection, causing another exception
hiding the original one. The fix is on `close()`, not on `__exit__()`,
because the semantic of the latter is simply to call the former.

Closes #262.
2014-09-16 06:57:34 +01:00
Daniele Varrazzo
0e06addc9f Testing boilerplate unified in a single base class
The class makes a connection always available, allows creating
new connection and closes everything on tear down.
2013-04-07 00:23:30 +01:00
Daniele Varrazzo
12645db754 Make sure to call subclasses methods on context exit 2012-12-03 03:37:47 +00:00
Daniele Varrazzo
cc605032f5 Added support for with statement for connection and cursor
The implementation should be conform to the DBAPI, although the "with"
extension has not been released yet.
2012-12-03 02:50:24 +00:00