You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@cassandra.apache.org by ca...@codespot.com on 2011/12/14 21:05:07 UTC

[cassandra-dbapi2] push by john.eri...@gmail.com - unittest.TestCase.skipTest is Python >= 2.7 on 2011-12-14 20:04 GMT

Revision: e108e06ba267
Author:   Eric Evans <ee...@sym-link.com>
Date:     Tue Dec 13 18:16:58 2011
Log:      unittest.TestCase.skipTest is Python >= 2.7

http://code.google.com/a/apache-extras.org/p/cassandra-dbapi2/source/detail?r=e108e06ba267

Modified:
  /test/test_cql.py

=======================================
--- /test/test_cql.py	Mon Nov  7 13:42:10 2011
+++ /test/test_cql.py	Tue Dec 13 18:16:58 2011
@@ -221,7 +221,10 @@
          "retrieve a range of rows with columns"

          if self.get_partitioner().split('.')[-1] == 'RandomPartitioner':
-            self.skipTest("Key ranges don't make sense under RP")
+            # skipTest is >= Python 2.7
+            if hasattr(self, 'skipTest'):
+                self.skipTest("Key ranges don't make sense under RP")
+            else: return None

          # everything
          cursor = self.cursor
@@ -382,7 +385,10 @@
          "indexed scan with a starting key"

          if self.get_partitioner().split('.')[-1] == 'RandomPartitioner':
-            self.skipTest("Key ranges don't make sense under RP")
+            # skipTest is Python >= 2.7
+            if hasattr(self, 'skipTest'):
+                self.skipTest("Key ranges don't make sense under RP")
+            else: return None

          cursor = self.cursor
          cursor.execute("""