couchdb-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From tonysu...@apache.org
Subject couchdb-mango git commit: Add testcase for empty range
Date Tue, 24 Feb 2015 20:09:33 GMT
Repository: couchdb-mango
Updated Branches:
  refs/heads/tonysun83-start-end-key-issue 3611aadb2 -> b3032dc23


Add testcase for empty range

Fixes COUCHDB-2614


Project: http://git-wip-us.apache.org/repos/asf/couchdb-mango/repo
Commit: http://git-wip-us.apache.org/repos/asf/couchdb-mango/commit/b3032dc2
Tree: http://git-wip-us.apache.org/repos/asf/couchdb-mango/tree/b3032dc2
Diff: http://git-wip-us.apache.org/repos/asf/couchdb-mango/diff/b3032dc2

Branch: refs/heads/tonysun83-start-end-key-issue
Commit: b3032dc23cfed46df4fab2f36e9b8412f2711856
Parents: 3611aad
Author: Tony Sun <tony.sun@cloudant.com>
Authored: Tue Feb 24 12:05:09 2015 -0800
Committer: Tony Sun <tony.sun@cloudant.com>
Committed: Tue Feb 24 12:05:09 2015 -0800

----------------------------------------------------------------------
 test/02-basic-find-test.py | 9 +++++++++
 1 file changed, 9 insertions(+)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/couchdb-mango/blob/b3032dc2/test/02-basic-find-test.py
----------------------------------------------------------------------
diff --git a/test/02-basic-find-test.py b/test/02-basic-find-test.py
index 8113b21..37459a2 100644
--- a/test/02-basic-find-test.py
+++ b/test/02-basic-find-test.py
@@ -258,3 +258,12 @@ class BasicFindTests(mango.UserDocsTests):
             })
         assert len(docs) == 1
         assert docs[0]["user_id"] == "eo"
+
+    def test_unsatisfiable_range(self):
+        docs = self.db.find({
+                "$and":[
+                    {"age":{"$gt": 0}},
+                    {"age":{"$lt": 0}}
+                ]
+            })
+        assert len(docs) == 0


Mime
View raw message