diff options
| author | Federico Caselli <cfederico87@gmail.com> | 2020-09-02 23:46:06 +0200 |
|---|---|---|
| committer | Mike Bayer <mike_mp@zzzcomputing.com> | 2020-09-08 17:13:48 -0400 |
| commit | e8600608669d90c4a6385b312d271aed63eb5854 (patch) | |
| tree | ef984a01c536b2c81d2283b3ca5d9f4395f41dd0 /test/sql/test_sequences.py | |
| parent | 0d56a62f721ee6c91d8a8b6a407b959c9215b3b6 (diff) | |
| download | sqlalchemy-e8600608669d90c4a6385b312d271aed63eb5854.tar.gz | |
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
Diffstat (limited to 'test/sql/test_sequences.py')
| -rw-r--r-- | test/sql/test_sequences.py | 10 |
1 files changed, 5 insertions, 5 deletions
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: |
