From ceee1951194f5014ee17416e4cef70abc2ffbfd9 Mon Sep 17 00:00:00 2001 From: Lele Gaifax Date: Mon, 31 Oct 2022 09:14:04 +0100 Subject: [PATCH] Exploit literal() instead of hardcoding the SQL --- test/dialect/postgresql/test_dialect.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/test/dialect/postgresql/test_dialect.py b/test/dialect/postgresql/test_dialect.py index 0e65167d9b..608843b596 100644 --- a/test/dialect/postgresql/test_dialect.py +++ b/test/dialect/postgresql/test_dialect.py @@ -1232,8 +1232,8 @@ class TestRange(fixtures.TestBase): ) def test_contains_value(self, connection, rrepr, v): q = select( - literal_column(f"'{rrepr}'::int4range", INT4RANGE), - literal_column(f"{v} <@ '{rrepr}'::int4range"), + literal(rrepr, INT4RANGE), + literal(rrepr, INT4RANGE).contains(v), ) r, expected = connection.execute(q).first() eq_(r.contains(v), expected) -- 2.47.3