Revision: ef794492c0fc
Author:   paul cannon <p...@datastax.com>
Date:     Thu Dec 15 12:05:00 2011
Log:      Merge branch 'master' into issue-12

Conflicts:
        test/test_cql.py

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

Modified:
 /test/test_cql.py

=======================================
--- /test/test_cql.py   Thu Dec 15 11:51:25 2011
+++ /test/test_cql.py   Thu Dec 15 12:05:00 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("""
@@ -431,7 +437,8 @@
         assert cursor.rowcount > 0
         cursor.execute('TRUNCATE StandardString1;')
         cursor.execute("SELECT * FROM StandardString1")
-        assert cursor.rowcount == 0
+        assert cursor.rowcount == 0, \
+            "expected empty resultset, got %d rows" % cursor.rowcount

         # truncate against non-existing CF
         assert_raises(cql.ProgrammingError,

Reply via email to