Daniele Varrazzo
ed3b2188fe
Fixed import of test functions from Python 2.7 unittest.
2010-11-19 18:01:29 +00:00
Daniele Varrazzo
bbe28ba75f
Add a small delay to receive notification when testing on busy network.
2010-11-19 14:44:47 +00:00
Daniele Varrazzo
21dfc2c592
Float test skipped where the server doesn't support inf.
2010-11-19 10:44:39 +00:00
Daniele Varrazzo
a55e50b991
hstore test passes against non-utf8 databases.
2010-11-19 10:29:07 +00:00
Daniele Varrazzo
19ead4a5cb
Test cleanup.
...
Tests pass or fail gracefully on older PostgreSQL versions.
If unittest2 is available, skip tests instead of printing warnings.
2010-11-19 03:55:37 +00:00
Daniele Varrazzo
bcacdc8461
Added enum with possilbe isolation level states.
...
Also, general isolation levels cleanup and tests added.
2010-11-18 00:31:51 +00:00
Daniele Varrazzo
9849083628
Added tests to check the effective isolation level.
2010-11-17 01:04:34 +00:00
Daniele Varrazzo
cd19f9115d
Fixed notices order (ticket #9 ).
2010-11-11 11:54:43 +00:00
Daniele Varrazzo
3cae0f3f5d
NamedTupleCursor doesn't change exception when fetching with no result.
2010-11-11 10:39:42 +00:00
Daniele Varrazzo
ef7a5ee8a9
Build the namedtuple only once per execution, not once per fetch.
2010-11-11 10:39:42 +00:00
Daniele Varrazzo
11c021cb21
Fixed tests to run on Windows.
2010-11-11 10:39:35 +00:00
Daniele Varrazzo
9fe0511711
Silencing other 2 tests failures due to 2pc disabled in the server.
2010-11-09 01:44:42 +00:00
Daniele Varrazzo
0d318179a9
Fixed test syntax for py 2.4.
2010-11-09 00:09:32 +00:00
Daniele Varrazzo
62d3a1533b
Use the adapter of an object superclass if available.
2010-11-08 01:35:06 +00:00
Daniele Varrazzo
7276c4a6b1
Tests fail gracefully if tpc is supported but disabled by the server.
2010-11-08 01:28:00 +00:00
Daniele Varrazzo
abad3127ca
Added NamedTupleCursor.
2010-11-06 04:33:44 +00:00
Daniele Varrazzo
985425fb38
Added test to verify the ticket #7 is fixed.
2010-11-06 02:24:28 +00:00
Daniele Varrazzo
77c0ab02d8
The Notify type is hashable.
...
If there is no payload, hash the same way the equivalent 2-tuple does.
Otherwise hash on the payload too.
2010-11-05 09:34:52 +00:00
Daniele Varrazzo
56ae1fe4bf
Payload default is the empty string.
2010-11-05 09:34:52 +00:00
Daniele Varrazzo
9c58c01e0f
Added comparison between Notify objects and Notify or tuple.
...
Explicit comparison with the tuple is required if we want to make
Notify() == (pid, channel) work: item access is not enough (and a test
in the suite fails if we get this wrong).
2010-11-05 09:34:52 +00:00
Daniele Varrazzo
1b100b5cbf
Skip tests if the hstore type is not in the test database.
2010-11-05 09:34:52 +00:00
Daniele Varrazzo
d5bf400cb4
The hstore typecast can be registered globally.
2010-11-05 09:34:52 +00:00
Daniele Varrazzo
ed623776f3
Hstore can return unicode keys and values.
2010-11-05 09:34:51 +00:00
Daniele Varrazzo
00e005b77d
Added test to verify dict roundtrip with hstore.
2010-11-05 09:34:50 +00:00
Daniele Varrazzo
af835f8857
Correctly parse escaped quotes from hstore.
...
Parse regexp simplified.
2010-11-05 09:34:50 +00:00
Daniele Varrazzo
6d441b6e03
Added hstore typecaster registration.
2010-11-05 09:34:50 +00:00
Daniele Varrazzo
fef9727cce
parse_hstore converted in class method.
2010-11-05 09:34:50 +00:00
Daniele Varrazzo
5844e989c4
Added function to parse an hstore into a dict.
2010-11-05 09:34:50 +00:00
Daniele Varrazzo
5693c9cab1
Added implementation of python dict adapter to hstore.
2010-11-05 09:34:50 +00:00
Daniele Varrazzo
3e658c33b5
Ensure unicode is accepted as type for transaction ids.
...
We don't do somersaults to ensure people can use snowmen as transaction
ids anyway: it would require passing the connection to xid_ensure and
down below to use the correct encoding.
2010-11-05 09:34:50 +00:00
Daniele Varrazzo
4f3976681a
Added Xid.from_string() constructor.
...
It exposes the parsing rules used in restore.
2010-11-05 09:34:49 +00:00
Daniele Varrazzo
774be1d616
Dropped XID_UNPARSED: we use format_id = None for PG xact ids.
2010-11-05 09:34:49 +00:00
Daniele Varrazzo
978cac3a1b
XA transaction ids can be decoded from PostgreSQL transaction ids.
2010-11-05 09:34:48 +00:00
Daniele Varrazzo
c0c116dcc4
Use pgjdbc algorithm to convert XA xids into strings.
2010-11-05 09:34:48 +00:00
Daniele Varrazzo
397eace051
Added tests for two-phase commit/rollback.
2010-11-05 09:34:48 +00:00
Daniele Varrazzo
56c02b0f94
Added tpc_recover method.
2010-11-05 09:34:48 +00:00
Daniele Varrazzo
8bfd34faf2
hook up two phase commit tests.
...
By James Henstridge on 2008-07-24.
Merged from lp:~jamesh/psycopg/two-phase-commit/revision/359
2010-11-05 09:34:47 +00:00
Daniele Varrazzo
e863222b5c
beginnings of a TPC test harness
...
By James Henstridge on 2008-05-12.
Merged from lp:~jamesh/psycopg/two-phase-commit/revision/354
2010-11-05 09:34:47 +00:00
Daniele Varrazzo
4ec298e112
Notify object exposed in the extensions module.
2010-11-05 09:34:47 +00:00
Daniele Varrazzo
f435d15c95
Adding Notify object with payload.
2010-11-05 09:34:46 +00:00
Daniele Varrazzo
e651308287
Check the correctness of the PID in the notify tests.
2010-11-05 09:34:46 +00:00
Daniele Varrazzo
bc2aefeacf
cursor.mogrify() accepts unicode queries.
2010-10-05 03:13:44 +01:00
Daniele Varrazzo
575b2b5f77
The Inet type knows how to adapt itself.
...
Implemented __conform__ as the Adaptation PEP suggests. It is not
required for the type to be registered as adapter.
2010-09-25 23:55:55 +01:00
Daniele Varrazzo
b072a04c9c
DBAPI compatibility test updated to 1.12.
...
Nothing major: Python 3.0 compatibility fixes.
2010-09-23 23:36:58 +01:00
Federico Di Gregorio
557608f715
Applied spelling fixes patch from Peter Eisentraut
2010-07-18 12:14:46 +02:00
Daniele Varrazzo
deb2d9050f
Exceptions raised by the columns iterator propagated.
2010-07-10 00:12:50 +01:00
Daniele Varrazzo
cb8128c6d4
Added test to verify copy_from() with columns.
2010-07-10 00:04:54 +01:00
Daniele Varrazzo
bd6a4139da
Added test to verify executemany doesn't propagate exceptions.
2010-07-09 15:23:02 +01:00
Daniele Varrazzo
305d86f38a
Handle time zones with seconds in the UTC offset.
...
The offset is rounded to the nearest minute.
2010-05-20 02:16:04 +01:00
Daniele Varrazzo
b597ccf917
Tests can be run again different coroutine libraries.
...
Use PSYCOPG2_TEST_GREEN=<something>, where <something> is 1 or a library
name. Currently eventlet is supported.
2010-05-19 11:40:13 +01:00