]> git.ipfire.org Git - thirdparty/sqlalchemy/sqlalchemy.git/commitdiff
(no commit message)
authorMike Bayer <mike_mp@zzzcomputing.com>
Sun, 23 Oct 2005 18:31:25 +0000 (18:31 +0000)
committerMike Bayer <mike_mp@zzzcomputing.com>
Sun, 23 Oct 2005 18:31:25 +0000 (18:31 +0000)
lib/sqlalchemy/databases/oracle.py
test/testbase.py

index b0b9bf8c5ce496b3c637b77b0fb6e3d3ebb8fd0b..15b6ce6682ec042341b2eee81ef6d9c599d0b5c4 100644 (file)
@@ -204,7 +204,6 @@ class OracleSchemaGenerator(ansisql.ANSISchemaGenerator):
 
 class OracleSchemaDropper(ansisql.ANSISchemaDropper):
     def visit_sequence(self, sequence):
-        if not sequence.optional:
-            self.append("DROP SEQUENCE %s" % sequence.name)
-            self.execute()
+        self.append("DROP SEQUENCE %s" % sequence.name)
+        self.execute()
 
index b4fbb3142c885e31e09041aea63004de978f93fb..3b16d3105ce81fb3615d5afd31d56e7d33c6c383 100644 (file)
@@ -88,7 +88,19 @@ class TTestSuite(unittest.TestSuite):
             self._initTest = None
         unittest.TestSuite.__init__(self, tests)
 
+    def do_run(self, result):
+       """nice job unittest !  you switched __call__ and run() between py2.3 and 2.4 thereby
+       making straight subclassing impossible !"""
+        for test in self._tests:
+            if result.shouldStop:
+                break
+            test(result)
+        return result
+
     def run(self, result):
+        return self(result)
+
+    def __call__(self, result):
         try:
             if self._initTest is not None:
                 self._initTest.setUpAll()
@@ -96,7 +108,7 @@ class TTestSuite(unittest.TestSuite):
             result.addError(self._initTest, self.__exc_info())
             pass
         try:
-            return unittest.TestSuite.run(self, result)
+            return self.do_run(result)
         finally:
             try:
                 if self._initTest is not None:
@@ -116,7 +128,6 @@ class TTestSuite(unittest.TestSuite):
             return (exctype, excvalue, tb)
         return (exctype, excvalue, tb)
 
-
 unittest.TestLoader.suiteClass = TTestSuite
                     
 def runTests(suite):
@@ -124,4 +135,4 @@ def runTests(suite):
     runner.run(suite)
     
 def main():
-    unittest.main()
\ No newline at end of file
+    unittest.main()