]> git.ipfire.org Git - thirdparty/sqlalchemy/sqlalchemy.git/commitdiff
- Loosened up test_cant_execute_join for oracle (probably) + bonus typo fix
authorJason Kirtland <jek@discorporate.us>
Mon, 8 Oct 2007 03:01:04 +0000 (03:01 +0000)
committerJason Kirtland <jek@discorporate.us>
Mon, 8 Oct 2007 03:01:04 +0000 (03:01 +0000)
- Some docstring formatting waiting for pg to finish the tests...  waiting...

lib/sqlalchemy/engine/base.py
test/sql/query.py

index fa58657dcb22f23c53e295c85c7d531ba49f4591..656384ba657b6a8a120cbd2d695a5220ab846396 100644 (file)
@@ -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)
index 00eac66fd0630b0a5c96c6a2a1dadfea86763973..ab593f6ef970456b92371ebcb61d537b900709d8 100644 (file)
@@ -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()