Daniele Varrazzo
546927d44a
Use wrap to fix names of decorated test methods
...
Decorators not using wrap() prevent running the test from command line, e.g.
with:
python tests/__init__.py test_module.TestSuite.test_method
2013-03-20 23:53:20 +00:00
Daniele Varrazzo
31265e3439
Fixed broken test decorator preventing 3 tests to run
2013-03-20 23:53:19 +00:00
Daniele Varrazzo
28f1013c2a
Dropped duplicate import
2012-01-14 17:28:37 +00:00
Daniele Varrazzo
3ba0631dbb
A few large objects tests fixed
...
The behavior changed in Python 3 after the lobject-decode merge.
2011-01-10 22:05:47 +00:00
Daniele Varrazzo
ba1d77a297
Large object mode parsing refactored
...
Added parsing of text/binary mode.
2011-01-10 00:46:51 +00:00
Daniele Varrazzo
f63167a92c
Added tests to check large objects decoding
2011-01-10 00:46:51 +00:00
Daniele Varrazzo
79048ff19a
Merge branch 'python2' into python3
...
Conflicts:
NEWS-2.3
tests/__init__.py
tests/test_lobject.py
tests/test_quote.py
tests/testutils.py
2011-01-10 00:46:02 +00:00
Daniele Varrazzo
48588e5f69
Invalidate large objects after a two-phase commit operation
2011-01-10 00:20:55 +00:00
Daniele Varrazzo
935c25730a
Fixed segfault in large object close.
...
Check that the connection is not closed/faulty before attempting lo_close.
2011-01-10 00:11:14 +00:00
Daniele Varrazzo
15a09da96d
Added license to unit tests
...
As the test suite is now part of the source distribution.
2011-01-09 23:44:35 +00:00
Daniele Varrazzo
f8c4335f35
Avoid ResourceWarning in tests in Python 3.2
2011-01-08 23:54:48 +00:00
Daniele Varrazzo
7c1b03bd45
All tests made executable.
2011-01-07 00:58:29 +00:00
Daniele Varrazzo
b78ff4a273
Several tests ported to Python 3.
2010-12-31 03:18:27 +01:00
Daniele Varrazzo
ade1b2cc7b
Test suite converted into a proper package.
...
Dropped cyclic import from modules to tests: they were only working
because a second copy of the package was found in the project dir.
Use relative import so that 2to3 can do a good conversion.
2010-12-21 05:02:19 +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
Jan Urbański
e0d789466a
Support large objects truncating.
...
The lobject.truncate(len=0) method will be available if psycopg2 has
been built against libpq from 8.3 or later (which is when the lobject
truncating support has been introduced).
2010-03-29 09:19:35 +02:00
Federico Di Gregorio
611606d532
Changes license to LGPL3 + OpenSSL exception on all source files
2010-02-12 23:34:53 +01:00
Federico Di Gregorio
3a6911216b
Fixed problem with large writes in large objects code
2009-08-09 17:05:16 +02:00
Federico Di Gregorio
e8ef973ddf
Fixed lobject test failures
2009-04-01 20:49:00 +02:00
James Henstridge
7d66c20edb
* tests/test_lobject.py (LargeObjectTests): add more tests,
...
including behaviour on closed lobjects and stale lobjects.
* psycopg/lobject_type.c (psyco_lobj_close): don't mark the
connection closed here because it is done by
lobject_close_locked().
* psycopg/lobject_int.c (lobject_open): mark objects as not closed
if we successfully open them.
(lobject_close_locked): mark the lobject closed here.
(lobject_export): ensure we are in a transaction, since
lo_export() issues multiple queries.
* psycopg/lobject_type.c (lobject_setup): make lobjects start closed.
2008-05-06 17:04:26 +08:00
James Henstridge
9a48c261be
Add basic tests for large object code. Fix lobject.seek() to actually
...
work.
2008-05-05 15:33:44 +08:00