From: Mike Bayer Date: Sun, 5 Oct 2008 00:24:43 +0000 (+0000) Subject: fixed test for #1175 X-Git-Tag: rel_0_5rc2~11 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=4597c678ac306094a15c5424759d4cc3dbad3d0c;p=thirdparty%2Fsqlalchemy%2Fsqlalchemy.git fixed test for #1175 --- diff --git a/test/engine/execute.py b/test/engine/execute.py index e449af9ad0..85a99c4524 100644 --- a/test/engine/execute.py +++ b/test/engine/execute.py @@ -2,7 +2,7 @@ import testenv; testenv.configure_for_tests() import re from sqlalchemy.interfaces import ConnectionProxy from testlib.sa import MetaData, Table, Column, Integer, String, INT, \ - VARCHAR, func + VARCHAR, func, bindparam import testlib.sa as tsa from testlib import TestBase, testing, engines @@ -79,11 +79,10 @@ class ExecuteTest(TestBase): assert True def test_empty_insert(self): - try: - result = testing.db.execute(users.insert(), []) - assert [] == list(result) - except: - assert False + """test that execute() interprets [] as a list with no params""" + + result = testing.db.execute(users.insert().values(user_name=bindparam('name')), []) + assert result.rowcount == 1 class ProxyConnectionTest(TestBase): @testing.fails_on('firebird') # Data type unknown