summaryrefslogtreecommitdiff
path: root/tests
Commit message (Collapse)AuthorAgeFilesLines
* Fixed use of StandardError in testDaniele Varrazzo2019-02-111-1/+1
| | | | In Py3 it's gone.
* SQLSTATE error classes implemented in CDaniele Varrazzo2019-02-101-3/+22
| | | | The module is only used to export them to Python.
* Use a proper LRU cache for namedtuplesfast-namedtupleDaniele Varrazzo2019-02-021-13/+16
| | | | | | | | | Previous one didn't refresh by last use. Use the stdlib version for py3 and one of our own for py2. Max size set to 512, which should be fine for everyone (tweaking is still possible by monkeypatching, as the tests do, but I don't want to make an interface of it).
* Added caching of types generated by NamedTupleCursorDaniele Varrazzo2019-02-021-0/+36
| | | | see #838
* Added BYTESARRAY typecasterDaniele Varrazzo2019-01-181-0/+26
|
* Added test for BYTES typecasterDaniele Varrazzo2019-01-181-0/+11
|
* Merge remote-tracking branch ↵Daniele Varrazzo2018-12-271-0/+9
|\ | | | | | | 'eternalflow/execute-values-returning-clause-support'
| * rename param name to fetchIvan Kotelnikov2018-11-241-1/+1
| |
| * write test for fetch_result flagIvan Kotelnikov2018-11-221-0/+9
| |
* | Remove unnecessary test decorator 'skip_if_cant_cast'Jon Dufresne2018-12-041-27/+8
| | | | | | | | | | | | ctypes is available and works on all supported Pythons. It has been available since Python 2.5. The tests were written when Python 2.4 was still supported.
* | Merge pull request #822 from jdufresne/decorate-allDaniele Varrazzo2018-12-042-88/+50
|\ \ | | | | | | Simplify 'decorate_all_tests' usage by decorating the test class
| * | Simplify 'decorate_all_tests' usage by decorating the test classJon Dufresne2018-12-012-88/+50
| |/ | | | | | | | | Skip tests as early as possible by decorating the whole class with unittest.skipIf instead of every test method individually.
* | Remove workarounds for unsupported libpq < 9.1Jon Dufresne2018-12-011-2/+0
|/ | | | | | Per http://initd.org/psycopg/docs/install.html#prerequisites: > PostgreSQL client library version from 9.1
* Convert int subclasses to long before adaptingDaniele Varrazzo2018-11-161-0/+12
| | | | | | | | | | | | Fixes adaptation of int/long subclasses whose str() is not the number, such IntEnum Close #591 Note that I thought it would have needed a new adapter, so I considered it a new feature. But it is more a shortcoming of the int adapter failing to do something reasonable (poor Liskov, always mistreated) so I may actually backport it if there is a new 2.7 release.
* Merge branch 'master' into feature-expose-pgconnFederico Di Gregorio2018-11-0726-172/+572
|\
| * Fixed adaptation of lists of empty listsfix-788Daniele Varrazzo2018-10-301-3/+6
| | | | | | | | | | | | | | | | ...somehow. Postgres doesn't support them and converts them into a simple empty array. However this is not really our concern: the syntax we return is valid. Close #788
| * Use class decorators to decorate all testsdecorators-funDaniele Varrazzo2018-10-309-87/+81
| | | | | | | | | | | | Test decorators changed so that they can be applied either to a method or to a class. Of course their double nature is implemented by a decorator.
| * Don't barf on Composite passed to execute_values()fix-794Daniele Varrazzo2018-10-231-0/+20
| | | | | | | | Close #794
| * Full flake8 3.5 cleanupDaniele Varrazzo2018-10-2324-25/+68
| |
| * Merge branch 'connection-info'Daniele Varrazzo2018-10-158-70/+209
| |\
| | * Use the connection.info properties instead of the legacy methodsconnection-infoDaniele Varrazzo2018-10-138-65/+65
| | |
| | * Guard from some info functions not available in some libpq versionsDaniele Varrazzo2018-10-131-0/+11
| | |
| | * Added ConnectionInfo.parameter_status()Daniele Varrazzo2018-10-131-0/+15
| | |
| | * Added ConnectionInfo.ssl_attribute()Daniele Varrazzo2018-10-131-0/+15
| | |
| | * Added all the missing ConnectionInfo attributesDaniele Varrazzo2018-10-131-0/+28
| | |
| | * Added ConnectionInfo.error_messageDaniele Varrazzo2018-10-131-0/+12
| | |
| | * Added other members to the ConnectionInfo classDaniele Varrazzo2018-10-121-1/+26
| | | | | | | | | | | | | | | Starting deprecating softly some of the methods bloating the connection class.
| | * Added several ConnectionInfo attributesDaniele Varrazzo2018-10-121-0/+36
| | |
| | * Moving host attribute to a connection.info objectDaniele Varrazzo2018-10-111-6/+3
| | |
| * | Merge branch 'master' into errors-moduleerrors-moduleDaniele Varrazzo2018-10-1511-70/+203
| |\ \
| | * | Fixed refcount in connection's readonly and deferrable gettersfix-790Daniele Varrazzo2018-10-121-0/+8
| | |/ | | | | | | | | | Close #790
| | * Added table_oid, table_column on cursor.description itemsdescription-extra-attrsDaniele Varrazzo2018-10-111-1/+22
| | | | | | | | | | | | Close #661
| | * Fixed infinite loop in pq_get_last_result after COPYDaniele Varrazzo2018-10-102-1/+13
| | | | | | | | | | | | | | | | | | | | | There will be an error downstream but we have to get out of this function first. Close #781
| | * Merge branch 'master' into httpsDaniele Varrazzo2018-10-105-9/+97
| | |\
| | | * Merge branch 'conn-get-host'Daniele Varrazzo2018-10-101-1/+14
| | | |\
| | | | * Added connection.hostMarco De Paoli2018-10-061-1/+14
| | | | | | | | | | | | | | | | | | | | Return the server host name of the current connect.
| | | * | Merge remote-tracking branch 'origin/diag-schema-name-nonloc'Daniele Varrazzo2018-10-101-2/+11
| | | |\ \
| | | | * | Added Diagnostics.severity_nonlocalized attributediag-schema-name-nonlocDaniele Varrazzo2018-10-041-2/+11
| | | | |/ | | | | | | | | | | | | | | | Close #783.
| | | * | Commented out test to avoid beaking masterFederico Di Gregorio2018-10-101-3/+3
| | | | |
| | | * | Fixed test for issue #788Federico Di Gregorio2018-10-101-1/+1
| | | | |
| | | * | Added test for issue #788Federico Di Gregorio2018-10-101-0/+4
| | | |/
| | | * sql.Identifier can wrap a sequence of strings to represent qualified namesidentifier-sequenceDaniele Varrazzo2018-10-041-6/+22
| | | | | | | | | | | | | | | | Close #732.
| | | * Implement __str__ for range typesMichel Albert2018-09-301-0/+46
| | | |
| | * | Prefer https:// URLs when availableJon Dufresne2018-09-223-4/+4
| | |/
| * | Added errors.lookup() functionDaniele Varrazzo2018-10-151-0/+8
| | |
| * | Read exceptions to raise from a Python moduleDaniele Varrazzo2018-08-172-0/+64
| | |
* | | Added connection.get_native_connection()Federico Di Gregorio2018-10-071-0/+5
| |/ |/|
* | Better testing of encryption function with libpq < 10encrypt-password-fix-testsDaniele Varrazzo2018-08-171-53/+44
| |
* | Bump tests for selective closure of named cursor to pg 8.2Daniele Varrazzo2018-07-242-2/+2
| | | | | | | | | | Previous versions don't support the features as they don't have the pg_cursors view. But they are too old to care.
* | Close named cursor if exist, even if we didn't run executeDaniele Varrazzo2018-07-241-0/+13
|/ | | | Close #746