You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@couchdb.apache.org by to...@apache.org on 2015/02/24 21:09:33 UTC
couchdb-mango git commit: Add testcase for empty range
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 <to...@cloudant.com>
Authored: Tue Feb 24 12:05:09 2015 -0800
Committer: Tony Sun <to...@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