Merge lp:~allenap/storm/empty-result-set-config-bug-905529 into lp:storm

Proposed by Gavin Panella on 2011-12-16
Status: Approved
Approved by: Free Ekanayaka on 2012-08-21
Approved revision: 428
Proposed branch: lp:~allenap/storm/empty-result-set-config-bug-905529
Merge into: lp:storm
Diff against target: 27 lines (+5/-1)
2 files modified
storm/store.py (+1/-1)
tests/store/base.py (+4/-0)
To merge this branch: bzr merge lp:~allenap/storm/empty-result-set-config-bug-905529
Reviewer Review Type Date Requested Status
Free Ekanayaka (community) 2011-12-16 Approve on 2012-08-21
Review via email: mp+86121@code.launchpad.net

Commit message

Return self from EmptyResultSet.config() to match ResultSet.

To post a comment you must log in.
Free Ekanayaka (free.ekanayaka) wrote :

+1!

review: Approve
Free Ekanayaka (free.ekanayaka) wrote :

We usually require 2 reviews for Storm branches, but this is essentially a trivial and Thomas agreed that one Approve is enough.

Unmerged revisions

428. By Gavin Panella on 2011-12-16

Return self from EmptyResultSet.config() to match ResultSet.

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
1=== modified file 'storm/store.py'
2--- storm/store.py 2011-05-16 10:45:52 +0000
3+++ storm/store.py 2011-12-16 21:53:23 +0000
4@@ -1517,7 +1517,7 @@
5 return result
6
7 def config(self, distinct=None, offset=None, limit=None):
8- pass
9+ return self
10
11 def __iter__(self):
12 return
13
14=== modified file 'tests/store/base.py'
15--- tests/store/base.py 2011-08-01 12:54:36 +0000
16+++ tests/store/base.py 2011-12-16 21:53:23 +0000
17@@ -6078,6 +6078,10 @@
18 self.empty.config(distinct=True, offset=1, limit=1)
19 self.assertEquals(list(self.result), list(self.empty))
20
21+ def test_config_returns_self(self):
22+ self.assertIs(self.result, self.result.config())
23+ self.assertIs(self.empty, self.empty.config())
24+
25 def test_slice(self):
26 self.assertEquals(list(self.result[:]), [])
27 self.assertEquals(list(self.empty[:]), [])

Subscribers

People subscribed via source and target branches

to status/vote changes: