-
Notifications
You must be signed in to change notification settings - Fork 41
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Account for sql.SQL
and sql.Composed
Objects
#177
Conversation
pgtrigger/tests/test_runtime.py
Outdated
(b"select count(*) from auth_user", ()), | ||
("select count(*) from auth_user where id = %s", (1,), 2), | ||
("select count(*) from auth_user", (), 2), | ||
(b"select count(*) from auth_user where id = %s", (1,), 2), |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It makes sense to run these on 3 as the query can still technically be bytes. See https://github.com/psycopg/psycopg/blob/master/psycopg/psycopg/abc.py#L30
pgtrigger/tests/test_runtime.py
Outdated
from unittest.mock import MagicMock | ||
|
||
SQL = MagicMock() | ||
Literal = MagicMock() |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Just to avoid the parameterization failing on 3.
…o fix-pgtrigger-ignore-issues
Support
sql.SQL
andsql.Composed
objects, which are valid ways to construct SQL expressions within Psycopg 2 and 3.