Merge lp:~zeitgeist/zeitgeist/related-remote-tests into lp:zeitgeist/0.1

Proposed by Seif Lotfy
Status: Merged
Merged at revision: 1531
Proposed branch: lp:~zeitgeist/zeitgeist/related-remote-tests
Merge into: lp:zeitgeist/0.1
Diff against target: 17 lines (+5/-2)
1 file modified
test/remote-test.py (+5/-2)
To merge this branch: bzr merge lp:~zeitgeist/zeitgeist/related-remote-tests
Reviewer Review Type Date Requested Status
Mikkel Kamstrup Erlandsen Approve
Review via email: mp+31537@code.launchpad.net

Description of the change

The algorithm sends out the proper results. The test case was wrong. However for assurance i added 2 tests of which results are easy to calculate

To post a comment you must log in.
Revision history for this message
Mikkel Kamstrup Erlandsen (kamstrup) wrote :

Looks good

review: Approve

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
1=== modified file 'test/remote-test.py'
2--- test/remote-test.py 2010-07-26 08:52:19 +0000
3+++ test/remote-test.py 2010-08-02 13:19:41 +0000
4@@ -285,8 +285,11 @@
5 events = parse_events("test/data/apriori_events.js")
6 self.insertEventsAndWait(events)
7
8- uris = self.findRelatedAndWait(["i4"], num_events=4, result_type=0)
9- self.assertEquals(set(uris), set(["i2", "i1", "i3", "i5"]))
10+ uris = self.findRelatedAndWait(["i2"], num_events=2, result_type=1)
11+ self.assertEquals(uris, ["i3", "i1"])
12+
13+ uris = self.findRelatedAndWait(["i2"], num_events=2, result_type=0)
14+ self.assertEquals(uris, ["i1", "i3"])
15
16 def testFindEventsForValues(self):
17 mainloop = gobject.MainLoop() # we don't have an *AndWait-helper method

Subscribers

People subscribed via source and target branches