Skip to content

Commit 5e0e29b

Browse files
committed
Fix test failure in new test due to division changes in Python 3
In Python 3 (through PEP 238), division behavior changed such that it always returns a float. This proceeds to cause problems with the CouchDB query parser, so we change the test case to use the floor division operator (which has the same behavior as default Python 2 division).
1 parent 6ecc03d commit 5e0e29b

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

couchdb/tests/client.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -788,8 +788,8 @@ def test_batchsizes(self):
788788

789789
def test_batchsizes_with_skip(self):
790790
self.assertEqual(
791-
len(list(self.db.iterview('test/nums', self.num_docs / 10, skip=self.num_docs / 2))),
792-
self.num_docs / 2)
791+
len(list(self.db.iterview('test/nums', self.num_docs // 10, skip=self.num_docs // 2))),
792+
self.num_docs // 2)
793793

794794
def test_limit(self):
795795
# limit=0 doesn't make sense for iterview.

0 commit comments

Comments
 (0)