Daniele Varrazzo
b241def64b
Fix representation of sql.Placeholder
...
Fix also Placeholder tests, including an error which made an assert
always true, which made us miss the regression in #1291 .
2021-06-17 00:28:14 +01:00
Daniele Varrazzo
dd2ff2af56
Fix regression with named sql.Placeholder
...
Close #1291 .
2021-06-16 23:56:05 +01:00
Daniele Varrazzo
1d3a89a0bb
Copyright year updated to 2021
...
ag -l Copyright | xargs sed -i \
"s/\(.*copyright (C) [0-9]\+\)\(-[0-9]\+\)\?\(.*Psycopg Team.*\)/\1-$(date +%Y)\3/I"
2021-06-15 00:37:22 +01:00
Hugo van Kemenade
7babeccbec
Upgrade Python syntax with pyupgrade --py36-plus
2020-11-17 22:22:11 +02:00
Hugo van Kemenade
6c48b63ae4
Drop support for EOL Python 2.7
2020-11-17 22:22:11 +02:00
Daniele Varrazzo
6eb4fab1db
Added reason for skipping on CockroachDB
2020-07-27 23:03:26 +01:00
Daniele Varrazzo
c8697e6c67
Several other tests skipped for CockroachDB
...
The only remaining test modules in this branch are test_types_basic/extra.
2020-07-22 02:43:19 +01:00
Daniele Varrazzo
5e0b02afb2
Copyright bumped to 2020
2020-01-17 21:21:11 +00:00
Daniele Varrazzo
599432552a
Copyright year updated
...
ag -l Copyright | xargs sed -i \
"s/\(.*copyright (C) [0-9]\+\)\(-[0-9]\+\)\?\(.*\)/\1-$(date +%Y)\3/I"
2019-02-17 01:36:36 +00:00
Daniele Varrazzo
05f9e231a0
Full flake8 3.5 cleanup
2018-10-23 00:39:14 +01:00
Daniele Varrazzo
4aa02b7855
sql.Identifier can wrap a sequence of strings to represent qualified names
...
Close #732 .
2018-10-04 12:46:10 +01:00
Jon Dufresne
be3b1ba1eb
In tests, use compat.py where there is overlap
2017-12-11 20:27:52 -08:00
Jon Dufresne
389f6c08d9
Avoid installing tests to site-packages
...
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.
2017-12-10 10:55:58 -08:00
Jon Dufresne
1a8e992fcc
Use relative imports throughout tests
...
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/
2017-12-10 10:51:07 -08:00
Daniele Varrazzo
06396e5162
Merge remote-tracking branch 'jdufresne/import-unittest'
2017-12-02 12:10:26 +00:00
Jon Dufresne
f5703dc3e5
Use builtin function next() throughout project
...
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
2017-12-01 19:57:37 -08:00
Jon Dufresne
fcc083dc12
Always import the system unittest
...
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.
2017-12-01 18:35:30 -08:00
Hugo
ffcc65d4f0
Drop support for EOL Python 2.6
2017-11-28 16:02:12 +00:00
Daniele Varrazzo
3bfbd3a0a5
Added test to verify sql objects work with copy_expert()
...
I'll be honest: I lucked out, I didn't think about this combination. But
maybe sheer luck, maybe using common code paths, it just works. Let's
make it stays so.
2017-03-16 00:55:20 +00:00
Daniele Varrazzo
3873c6c09f
Deal consistently with E'' quotes in tests
2017-02-06 21:40:05 +00:00
Daniele Varrazzo
a8a3a298f8
Autonumbered args not available in Python 2.6
2017-01-03 17:53:02 +01:00
Daniele Varrazzo
71a168797c
Several improvements to the sql objects
...
Comparable, iterable, content accessible
2017-01-03 17:27:01 +01:00
Daniele Varrazzo
a76e665567
Use {} instead of %s placeholders in SQL composition
2017-01-03 15:02:34 +01:00
Daniele Varrazzo
cf40bff2e2
Dropped sql.compose
...
Use a SQL % operator instead.
2017-01-01 08:39:02 +01:00
Daniele Varrazzo
4a55b8018a
Adding sql module documentation
2017-01-01 08:12:05 +01:00
Daniele Varrazzo
41b9bfe401
Added test for sql percents treatment
2017-01-01 06:37:09 +01:00
Daniele Varrazzo
828415d476
Typo: composible -> composable
2017-01-01 06:32:18 +01:00
Daniele Varrazzo
ad2643266f
Fixed sql.compose with no args and added tests
2017-01-01 06:26:54 +01:00
Daniele Varrazzo
8c020ca47a
Fixed sql.Composed representation
2017-01-01 06:26:42 +01:00
Daniele Varrazzo
600416aafc
Fixed sql stuff in Py3
2017-01-01 05:59:21 +01:00
Daniele Varrazzo
f11e6d82b0
Added basic sql module implementation
2017-01-01 05:23:15 +01:00
Daniele Varrazzo
fad5100079
Adding some boilerplate for the new module
2017-01-01 03:53:08 +01:00