diff options
| author | mike bayer <mike_mp@zzzcomputing.com> | 2018-01-04 16:29:52 -0500 |
|---|---|---|
| committer | Gerrit Code Review <gerrit@ci.zzzcomputing.com> | 2018-01-04 16:29:52 -0500 |
| commit | 5a6885bac8d025aea680901d9284759766ef2162 (patch) | |
| tree | b6595597c70356543429111c0279e65f9c484f7a /lib/sqlalchemy/testing | |
| parent | 2c713b58179ee160f38f6bc7c88a7748fee48bc1 (diff) | |
| parent | 43c7c4f347fa6a5a6493bd03e2233fd5d14aee9e (diff) | |
| download | sqlalchemy-5a6885bac8d025aea680901d9284759766ef2162.tar.gz | |
Merge "Add rule to prevent "GROUP BY <expr>" in tests"
Diffstat (limited to 'lib/sqlalchemy/testing')
| -rw-r--r-- | lib/sqlalchemy/testing/requirements.py | 11 | ||||
| -rw-r--r-- | lib/sqlalchemy/testing/suite/test_select.py | 1 |
2 files changed, 12 insertions, 0 deletions
diff --git a/lib/sqlalchemy/testing/requirements.py b/lib/sqlalchemy/testing/requirements.py index 0b89a4506..b89d149d6 100644 --- a/lib/sqlalchemy/testing/requirements.py +++ b/lib/sqlalchemy/testing/requirements.py @@ -206,6 +206,17 @@ class SuiteRequirements(Requirements): return exclusions.open() + @property + def group_by_complex_expression(self): + """target platform supports SQL expressions in GROUP BY + + e.g. + + SELECT x + y AS somelabel FROM table GROUP BY x + y + + """ + + return exclusions.open() @property def sane_rowcount(self): diff --git a/lib/sqlalchemy/testing/suite/test_select.py b/lib/sqlalchemy/testing/suite/test_select.py index 097214823..df638c140 100644 --- a/lib/sqlalchemy/testing/suite/test_select.py +++ b/lib/sqlalchemy/testing/suite/test_select.py @@ -87,6 +87,7 @@ class OrderByLabelTest(fixtures.TablesTest): [(7, ), (5, ), (3, )] ) + @testing.requires.group_by_complex_expression def test_group_by_composed(self): table = self.tables.some_table expr = (table.c.x + table.c.y).label('lx') |
