From: Jason Kirtland Date: Mon, 8 Oct 2007 03:01:04 +0000 (+0000) Subject: - Loosened up test_cant_execute_join for oracle (probably) + bonus typo fix X-Git-Tag: rel_0_4_0~58 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=afa713d9e84e5833f75543811d4978eb003fae46;p=thirdparty%2Fsqlalchemy%2Fsqlalchemy.git - Loosened up test_cant_execute_join for oracle (probably) + bonus typo fix - Some docstring formatting waiting for pg to finish the tests... waiting... --- diff --git a/lib/sqlalchemy/engine/base.py b/lib/sqlalchemy/engine/base.py index fa58657dcb..656384ba65 100644 --- a/lib/sqlalchemy/engine/base.py +++ b/lib/sqlalchemy/engine/base.py @@ -778,7 +778,7 @@ class Connection(Connectable): if c in Connection.executors: return Connection.executors[c](self, object, multiparams, params) else: - raise exceptions.InvalidRequestError("Unexecuteable object type: " + str(type(object))) + raise exceptions.InvalidRequestError("Unexecutable object type: " + str(type(object))) def _execute_default(self, default, multiparams=None, params=None): return self.__engine.dialect.defaultrunner(self.__create_execution_context()).traverse_single(default) @@ -831,7 +831,7 @@ class Connection(Connectable): def _execute_compiled(self, compiled, multiparams=None, params=None, distilled_params=None): """Execute a sql.Compiled object.""" if not compiled.can_execute: - raise exceptions.ArgumentError("Not an executeable clause: %s" % (str(compiled))) + raise exceptions.ArgumentError("Not an executable clause: %s" % (str(compiled))) if distilled_params is None: distilled_params = self.__distill_params(multiparams, params) diff --git a/test/sql/query.py b/test/sql/query.py index 00eac66fd0..ab593f6ef9 100644 --- a/test/sql/query.py +++ b/test/sql/query.py @@ -41,7 +41,6 @@ class QueryTest(PersistTest): assert users.select().execute().fetchall() == [(7, 'jack'), (8, 'ed'), (9, None)] def testupdate(self): - users.insert().execute(user_id = 7, user_name = 'jack') assert users.count().scalar() == 1 @@ -49,12 +48,12 @@ class QueryTest(PersistTest): assert users.select(users.c.user_id==7).execute().fetchone()['user_name'] == 'fred' def test_lastrow_accessor(self): - """test the last_inserted_ids() and lastrow_has_id() functions""" + """Tests the last_inserted_ids() and lastrow_has_id() functions.""" def insert_values(table, values): - """insert a row into a table, return the full list of values INSERTed including defaults - that fired off on the DB side. - + """ + Inserts a row into a table, returns the full list of values + INSERTed including defaults that fired off on the DB side and detects rows that had defaults and post-fetches. """ @@ -161,8 +160,11 @@ class QueryTest(PersistTest): assert c.execute(s, id=7).fetchall()[0]['user_id'] == 7 def test_repeated_bindparams(self): - """test that a BindParam can be used more than once. - this should be run for dbs with both positional and named paramstyles.""" + """Tests that a BindParam can be used more than once. + + This should be run for DB-APIs with both positional and named + paramstyles. + """ users.insert().execute(user_id = 7, user_name = 'jack') users.insert().execute(user_id = 8, user_name = 'fred') @@ -325,7 +327,7 @@ class QueryTest(PersistTest): try: users.join(addresses).execute() except exceptions.ArgumentError, e: - assert str(e) == """Not an executeable clause: query_users JOIN query_addresses ON query_users.user_id = query_addresses.user_id""" + assert str(e).startswith('Not an executable clause: ') def test_functions(self): x = testbase.db.func.current_date().execute().scalar()