diff options
| author | jonathan vanasco <jonathan@2xlp.com> | 2020-10-28 14:35:39 -0400 |
|---|---|---|
| committer | Mike Bayer <mike_mp@zzzcomputing.com> | 2020-10-30 10:02:29 -0400 |
| commit | 9ddbd585a62ff1ad56e9ee6fef5898ced1932a88 (patch) | |
| tree | a1ba46d4c8fb5981062a22775fa73155532018e6 /lib/sqlalchemy/testing/suite | |
| parent | 10851b002844fa4f9de7af92dbb15cb1133497eb (diff) | |
| download | sqlalchemy-9ddbd585a62ff1ad56e9ee6fef5898ced1932a88.tar.gz | |
Apply underscore naming to several more operators
The operator changes are:
* `isfalse` is now `is_false`
* `isnot_distinct_from` is now `is_not_distinct_from`
* `istrue` is now `is_true`
* `notbetween` is now `not_between`
* `notcontains` is now `not_contains`
* `notendswith` is now `not_endswith`
* `notilike` is now `not_ilike`
* `notlike` is now `not_like`
* `notmatch` is now `not_match`
* `notstartswith` is now `not_startswith`
* `nullsfirst` is now `nulls_first`
* `nullslast` is now `nulls_last`
Because these are core operators, the internal migration strategy for this
change is to support legacy terms for an extended period of time -- if not
indefinitely -- but update all documentation, tutorials, and internal usage
to the new terms. The new terms are used to define the functions, and
the legacy terms have been deprecated into aliases of the new terms.
Fixes: #5435
Change-Id: Ifbd7cb1cdda5981990243c4fc4b4ff467dc132ac
Diffstat (limited to 'lib/sqlalchemy/testing/suite')
| -rw-r--r-- | lib/sqlalchemy/testing/suite/test_select.py | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/lib/sqlalchemy/testing/suite/test_select.py b/lib/sqlalchemy/testing/suite/test_select.py index ee9db9111..d15fae3c4 100644 --- a/lib/sqlalchemy/testing/suite/test_select.py +++ b/lib/sqlalchemy/testing/suite/test_select.py @@ -1349,7 +1349,7 @@ class IsOrIsNotDistinctFromTest(fixtures.TablesTest): id_="iaaa", argnames="col_a_value, col_b_value, expected_row_count_for_is", ) - def test_is_or_isnot_distinct_from( + def test_is_or_is_not_distinct_from( self, col_a_value, col_b_value, expected_row_count_for_is, connection ): tbl = self.tables.is_distinct_test @@ -1371,7 +1371,7 @@ class IsOrIsNotDistinctFromTest(fixtures.TablesTest): 1 if expected_row_count_for_is == 0 else 0 ) result = connection.execute( - tbl.select(tbl.c.col_a.isnot_distinct_from(tbl.c.col_b)) + tbl.select(tbl.c.col_a.is_not_distinct_from(tbl.c.col_b)) ).fetchall() eq_( len(result), |
