summaryrefslogtreecommitdiff
path: root/tests
Commit message (Collapse)AuthorAgeFilesLines
* 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
|
* 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
* DictCursor and RealDictCursor rows maintain columns orderDaniele Varrazzo2018-05-211-2/+63
| | | | Close #177.
* Merge branch 'master' into drop-2to3Daniele Varrazzo2018-05-207-86/+325
|\
| * Added tests to verify iter methods on dict cursorsDaniele Varrazzo2018-05-201-1/+64
| | | | | | | | ISTM the refactoring in #648 broke something
| * DictCursor/RealDictCursor tests splitDaniele Varrazzo2018-05-201-78/+82
| |
| * Fixed refcount handling in encrypt_passwordDaniele Varrazzo2018-05-201-0/+11
| | | | | | | | | | | | Added tests to check bad types, which discovered the above problem: on type error we would have decref'd on exit something that was only borrowed (because we wouldn't have performed matching increfs).
| * Fixed keywords support for encrypt_password and tests completedDaniele Varrazzo2018-05-201-2/+28
| |
| * Fixed code flow in encrypt_password()Daniele Varrazzo2018-05-201-14/+14
| | | | | | | | | | | | | | | | Fixed several shortcomings highlighted in #576 and not fixed as requested. Also fixed broken behaviour of ignoring the algorithm if the connection is missing.
| * Merge branch 'master' into encrypt-passDaniele Varrazzo2018-05-206-11/+52
| |\
| | * Merge branch 'fix-716'Daniele Varrazzo2018-05-202-1/+11
| | |\
| | | * Don't raise an exception closing an unused named cursorfix-716Daniele Varrazzo2018-05-202-1/+11
| | | | | | | | | | | | | | | | Close #716
| | * | Set minimal postgres version for intervalstyle testfix-707Daniele Varrazzo2018-05-201-0/+1
| | | |
| | * | Raise NotSupportedError fetching iso_8601 intervalsDaniele Varrazzo2018-05-201-0/+7
| | |/ | | | | | | | | | | | | | | | Previously it would have failed parsing and resulted in ValueError Close #707
| | * Merge remote-tracking branch 'nested-array-nulls'Daniele Varrazzo2018-05-202-9/+24
| | |\
| | | * 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.
| | * | Skipped test on db version not supporting unicode identifiersfix-211Daniele Varrazzo2018-05-181-0/+1
| | | |
| | * | Allow non-ascii chars in namedtuple fieldsDaniele Varrazzo2018-05-181-1/+8
| | |/ | | | | | | | | | | | | | | | | | | They can be valid chars in Python 3. Or maybe not? In which case Python will throw an exception, but that's fine. Fix regression introduced fixing #211
| * | Merge branch 'master' into masterAshesh Vashi2018-05-0827-414/+284
| |\ \ | | |/
| | * 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
| * | Moving the encrypt_password method from the connection class to theAshesh Vashi2017-09-141-7/+10
| | | | | | | | | | | | | | | psycopgmodule, and exported it from psycopg2.extensions as per review comments.
| * | Merge remote-tracking branch 'psycopg2/master'Ashesh Vashi2017-09-113-4/+12
| |\ \
| * | | 'encrypt_password' raises 'psycopg2.NotSupportedErorr' exception forAshesh Vashi2017-07-171-10/+4
| | | | | | | | | | | | | | | | | | | | server version >= 10, when compiled using libpq version < 10, when no algorithm is specified.
| * | | When compiled with libpq version < 10, it raises ↵Ashesh Vashi2017-07-171-1/+1
| | | | | | | | | | | | | | | | 'psycopg2.NotSupportedError' (not, psycopg2.ProgrammingError).
| * | | Added support for preparing the encrypted password of a PostgreSQLAshesh Vashi2017-07-171-1/+55
| | | | | | | | | | | | | | | | | | | | password using the libpq functions - 'PQencryptPasswordConn', and 'PQencryptPassword'.
* | | | In tests, use compat.py where there is overlapJon Dufresne2017-12-113-7/+8
| |_|/ |/| |
* | | 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.