summaryrefslogtreecommitdiff
path: root/tests
Commit message (Collapse)AuthorAgeFilesLines
* Hstore test fixed after adapting arrays dropped space after commasnested-array-nullsDaniele Varrazzo2018-05-181-2/+2
|
* Fixed adaptation of arrays of arrays of nullsDaniele Varrazzo2018-05-181-7/+22
| | | | Close #325, close #706.
* Allow strings subclasses in ensure_bytesfix-679Daniele Varrazzo2018-02-211-0/+14
| | | | Fix #679
* Convert fields names into valid Python identifiers in NamedTupleCursorDaniele Varrazzo2018-01-291-0/+8
| | | | Close #211.
* Silence warning on import failing a testDaniele Varrazzo2018-01-291-1/+5
|
* Fixed idempotence check changing connection characteristicsDaniele Varrazzo2018-01-111-0/+10
|
* Merge branch 'mogrify-on-closed-cursor'Daniele Varrazzo2018-01-111-0/+6
|\
| * 'cursor.mogrify()' can be called on closed cursorsmogrify-on-closed-cursorDaniele Varrazzo2018-01-111-0/+6
| | | | | | | | Fix #579.
* | Fixed test in asian time zonesDaniele Varrazzo2018-01-101-1/+2
|/ | | | Fix #652
* Avoid installing tests to site-packagesJon Dufresne2017-12-1011-26/+40
| | | | | | | | For library end users, there is no need to install tests alongside the package itself. This keeps the tests available for development without adding extra packages to user's site-packages directory. Reduces the size of the installed package. Avoids accidental execution of test code by an installed package.
* Skip register_hstore(..., unicode=True) tests on Python 3Jon Dufresne2017-12-101-1/+4
| | | | | | | | | | | Per the functions documentation, this argument is not supported on Python 3. Skip it during tests. > :param unicode: if `!True`, keys and values returned from the database > will be `!unicode` instead of `!str`. The option is not available on > Python 3 Work towards moving tests outside of the installed package.
* Use relative imports throughout testsJon Dufresne2017-12-1027-81/+81
| | | | | | | | | | | | | | The tests relied on Python2 relative import semantics. Python3 changed import semantics to always search sys.path by default. To import using a relative path it must have a leading dot. Forward compatible with newer Pythons. Works towards the goal of moving tests outside of the installed package. For more information, see PEP-328: https://www.python.org/dev/peps/pep-0328/
* Use print() function instead of print statement throughout projectJon Dufresne2017-12-101-2/+2
| | | | Forward compatible with newer Pythons.
* Fix use of "async" in test_cursor.pyJon Dufresne2017-12-101-1/+1
| | | | | "async" will be a keyword starting with Python 3.7. On Python 3.6, use of "async" causes a deprecation warning. Use the alias "async_" instead.
* Merge branch 'master' into wsDaniele Varrazzo2017-12-0224-126/+60
|\
| * Merge remote-tracking branch 'jdufresne/import-unittest'Daniele Varrazzo2017-12-0222-22/+40
| |\
| | * Always import the system unittestJon Dufresne2017-12-0122-22/+40
| | | | | | | | | | | | | | | | | | | | | There is no need to import testutils.unittest instead of simply unittest. They are simple aliases. Use system unittest to be more regular, consistent as well as idiomatic with the wider Python community.
| * | Merge remote-tracking branch 'jdufresne/leading0'Daniele Varrazzo2017-12-021-1/+1
| |\ \
| | * | Drop leading 0's from numeric literalsJon Dufresne2017-12-011-1/+1
| | |/ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Not compatible with Python3. Makes the code more forward compatible with modern Pythons. In Python2, it was an alternative syntax for octal. $ python3 >>> 01 File "<stdin>", line 1 01 ^ SyntaxError: invalid token
| * | Merge remote-tracking branch 'jdufresne/next-func'Daniele Varrazzo2017-12-023-9/+9
| |\ \
| | * | Use builtin function next() throughout projectJon Dufresne2017-12-013-9/+9
| | |/ | | | | | | | | | | | | | | | | | | Available since Python 2.6. Use of .next() is deprecated and not supported in Python 3. Forward compatible with modern Python. https://docs.python.org/2/library/functions.html#next
| * | Merge remote-tracking branch 'jdufresne/more-json'Daniele Varrazzo2017-12-021-56/+0
| |\ \
| | * | Remove test decorators for json moduleJon Dufresne2017-12-011-56/+0
| | |/ | | | | | | | | | | | | | | | | | | | | | The json module is available in all Python versions supported by psycopg2. No need to check for its presence when executing tests. Should have been included with d58844e5483483240f97537e9a77b4e79cea2ab3 but was missed.
| * | Remove unnecessary script_to_py3; make scripts compatible insteadJon Dufresne2017-12-015-38/+10
| |/ | | | | | | Part of the work towards moving tests out of the installed package.
* | Trim trailing whitespace from all files throughout projectJon Dufresne2017-12-011-17/+16
|/ | | | | | Many editors automatically trim whitespace on save. By trimming all files in one go, makes future diffs cleaner without extraneous whitespace changes.
* Collect rowcount in executemany even when discarding resultsDaniele Varrazzo2017-11-291-0/+14
| | | | Closes #633.
* Dropped unused test functionsDaniele Varrazzo2017-11-281-3/+0
|
* Remove redundant parenthesesHugo2017-11-281-2/+2
|
* Rewrite list creation as list literalHugo2017-11-281-3/+1
|
* Replace comparison with None with equality operatorHugo2017-11-281-1/+1
|
* Remove redundant hasattr checksHugo2017-11-281-31/+2
|
* Drop support for EOL Python 2.6Hugo2017-11-283-5/+1
|
* Remove "from __future__ import with_statement"Jon Dufresne2017-11-282-4/+0
| | | | | All versions of Python supported by psycopg2 have builtin support for the with statement. The import is unnecessary noise.
* Merge remote-tracking branch 'jdufresne/decimal'Daniele Varrazzo2017-11-281-11/+3
|\
| * Remove workaround for decimal moduleJon Dufresne2017-11-261-11/+3
| | | | | | | | | | | | | | | | The decimal module is available on all Python versions supported by psycopg2. It has been available since Python 2.4. No need to catch an ImportError. https://docs.python.org/2/library/decimal.html
* | Merge remote-tracking branch 'jdufresne/skip-before'Daniele Varrazzo2017-11-282-4/+1
|\ \
| * | Remove use of skip_before_python for unsupported Python versionsJon Dufresne2017-11-262-4/+1
| |/ | | | | | | | | psycopg2 does not support Python < 2.6, remove all test guards for these versions.
* | Merge remote-tracking branch 'jdufresne/uuid'Daniele Varrazzo2017-11-281-5/+0
|\ \
| * | Remove uuid workaround for older PythonsJon Dufresne2017-11-261-5/+0
| |/ | | | | | | uuid is available on all Python versions supported by psycopg2.
* | Merge remote-tracking branch 'jdufresne/iobase'Daniele Varrazzo2017-11-282-18/+1
|\ \
| * | Remove io.TextIOBase workaround for Python <= 2.5Jon Dufresne2017-11-262-18/+1
| |/ | | | | | | | | io.TextIOBase is available on all Python versions supported by psycopg2. Can remove all workarounds.
* | Remove workarounds for namedtuple on Python <= 2.5Jon Dufresne2017-11-264-73/+6
|/ | | | | | namedtuple is available on all Python versions supported by psycopg2. It was first introduced in Python 2.6. Can remove all workarounds and special documentation.
* Use modern except syntax throughout projectJon Dufresne2017-11-2013-30/+30
| | | | | | The syntax "except Exception, exc:" is deprecated. All Python versions supported by psycopg2 support the newer, modern syntax. Forward compatible with future Python versions.
* Don't cast point arrays to float arrays (fixes: #613)Federico Di Gregorio2017-11-161-0/+5
|
* Added back timestamptz[] default castfix-578Daniele Varrazzo2017-07-241-0/+5
| | | | | | | | | | It was registered as side effect of an excessive definition that got cleaned up in 338dbe70a6c78c7edddea985e2386ebd864378c6. Looking at other removed redundant type oids, this was the only one missing from the `string_types` map. Close #578.
* Deal with E'' strings comparisons in a few other tests2_7_2Daniele Varrazzo2017-07-221-4/+5
|
* Skipped a couple of test with unsupported postgres featuresDaniele Varrazzo2017-07-222-0/+2
|
* Merge branch 'fix-554'Daniele Varrazzo2017-06-171-0/+14
|\
| * Accept Composable in start_replication_expert()Daniele Varrazzo2017-06-171-0/+14
| | | | | | | | Close #554
* | Ignore spurious output in test with Python debug buildDaniele Varrazzo2017-06-171-0/+3
|/