summaryrefslogtreecommitdiff
path: root/test/engine
diff options
context:
space:
mode:
authorMike Bayer <mike_mp@zzzcomputing.com>2016-06-13 15:18:13 -0400
committerMike Bayer <mike_mp@zzzcomputing.com>2016-06-14 11:48:04 -0400
commitf38f890849700ee1bf719a31275260e2da455bc3 (patch)
treee5d8a958d853f05081e57045baa8c9806ad8f27a /test/engine
parent7189d0bc82598c2d6dcbb55b054837416db2ee7d (diff)
downloadsqlalchemy-f38f890849700ee1bf719a31275260e2da455bc3.tar.gz
Deprecate FromClause.count()
count() here is misleading in that it not only counts from an arbitrary column in the table, it also does not make accommodations for DISTINCT, JOIN, etc. as the ORM-level function does. Core should not be attempting to provide a function like this. Change-Id: I9916fc51ef744389a92c54660ab08e9695b8afc2 Fixes: #3724
Diffstat (limited to 'test/engine')
-rw-r--r--test/engine/test_execute.py3
1 files changed, 2 insertions, 1 deletions
diff --git a/test/engine/test_execute.py b/test/engine/test_execute.py
index b1c8673d1..8e553307f 100644
--- a/test/engine/test_execute.py
+++ b/test/engine/test_execute.py
@@ -599,7 +599,8 @@ class ConvenienceExecuteTest(fixtures.TablesTest):
def _assert_no_data(self):
eq_(
- testing.db.scalar(self.table.count()), 0
+ testing.db.scalar(
+ select([func.count('*')]).select_from(self.table)), 0
)
def _assert_fn(self, x, value=None):