From e8600608669d90c4a6385b312d271aed63eb5854 Mon Sep 17 00:00:00 2001 From: Federico Caselli Date: Wed, 2 Sep 2020 23:46:06 +0200 Subject: Update select usage to use the new 1.4 format This change includes mainly that the bracketed use within select() is moved to positional, and keyword arguments are removed from calls to the select() function. it does not yet fully address other issues such as keyword arguments passed to the table.select(). Additionally, allows False / None to both be considered as "disable" for all of select.correlate(), select.correlate_except(), query.correlate(), which establishes consistency with passing of ``False`` for the legact select(correlate=False) argument. Change-Id: Ie6c6e6abfbd3d75d4c8de504c0cf0159e6999108 --- test/sql/test_sequences.py | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) (limited to 'test/sql/test_sequences.py') diff --git a/test/sql/test_sequences.py b/test/sql/test_sequences.py index ee7c77a93..243ccfbab 100644 --- a/test/sql/test_sequences.py +++ b/test/sql/test_sequences.py @@ -150,7 +150,7 @@ class LegacySequenceExecTest(fixtures.TestBase): """test can use next_value() in select column expr""" s = Sequence("my_sequence") - self._assert_seq_result(testing.db.scalar(select([s.next_value()]))) + self._assert_seq_result(testing.db.scalar(select(s.next_value()))) class SequenceExecTest(fixtures.TestBase): @@ -201,7 +201,7 @@ class SequenceExecTest(fixtures.TestBase): """test can use next_value() in select column expr""" s = Sequence("my_sequence") - self._assert_seq_result(connection.scalar(select([s.next_value()]))) + self._assert_seq_result(connection.scalar(select(s.next_value()))) @testing.requires.sequences_in_other_clauses @testing.provide_metadata @@ -446,7 +446,7 @@ class TableBoundSequenceTest(fixtures.TablesTest): eq_( connection.scalar( - sa.select([cartitems.c.cart_id]).where( + sa.select(cartitems.c.cart_id).where( cartitems.c.description == "lala" ), ), @@ -526,7 +526,7 @@ class SequenceAsServerDefaultTest( t_seq_test = self.tables.t_seq_test connection.execute(t_seq_test.insert().values(data="some data")) - eq_(connection.scalar(select([t_seq_test.c.id])), 1) + eq_(connection.scalar(select(t_seq_test.c.id)), 1) def test_default_textual_server_only(self, connection): connection.exec_driver_sql( @@ -542,7 +542,7 @@ class SequenceAsServerDefaultTest( t_seq_test = self.tables.t_seq_test_2 connection.execute(t_seq_test.insert().values(data="some data")) - eq_(connection.scalar(select([t_seq_test.c.id])), 1) + eq_(connection.scalar(select(t_seq_test.c.id)), 1) def test_drop_ordering(self): with self.sql_execution_asserter(testing.db) as asserter: -- cgit v1.2.1