Merge lp:~barry/update-manager/lp1295392 into lp:update-manager

Proposed by Barry Warsaw
Status: Merged
Merged at revision: 2674
Proposed branch: lp:~barry/update-manager/lp1295392
Merge into: lp:update-manager
Diff against target: 23 lines (+4/-2)
1 file modified
tests/test_update_list.py (+4/-2)
To merge this branch: bzr merge lp:~barry/update-manager/lp1295392
Reviewer Review Type Date Requested Status
Michael Vogt (community) Approve
Review via email: mp+212065@code.launchpad.net
To post a comment you must log in.
Revision history for this message
Sebastien Bacher (seb128) wrote :

The bug pointed has been fixed by that commit it seems
http://bazaar.launchpad.net/~ubuntu-core-dev/update-manager/main/revision/2672

Not sure if the change proposed there still make sense in that context ... Michael?

Revision history for this message
Barry Warsaw (barry) wrote :

It's probably still relevant, but I'll let mvo decide.

Revision history for this message
Michael Vogt (mvo) wrote :

Thanks Barry and Seb - I think the mock_randint change is good to have, I tweaked the test a bit to include on ignored_src and one install_src (before one of the sets was always empty).

review: Approve

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
1=== modified file 'tests/test_update_list.py'
2--- tests/test_update_list.py 2013-06-06 05:50:56 +0000
3+++ tests/test_update_list.py 2014-03-20 22:19:21 +0000
4@@ -51,7 +51,9 @@
5 def test_second_phased_binary_not_included(self):
6 """ Test that there is no overlap between the source packages of the
7 packages being ignored and installed """
8- self.updates_list.update(self.cache)
9+ with patch.object(self.updates_list.random, "randint") as mock_randint:
10+ mock_randint.return_value = 0
11+ self.updates_list.update(self.cache)
12 ignored_srcs = set([pkg.candidate.source_name for pkg in
13 self.updates_list.ignored_phased_updates])
14 group = self.updates_list.update_groups[0]
15@@ -92,7 +94,7 @@
16 with patch.object(self.updates_list.random, "randint") as mock_randint:
17 mock_randint.return_value = 100
18 self.updates_list.update(self.cache)
19- self.assertUpdatesListLen(3)
20+ self.assertUpdatesListLen(3)
21
22
23 class GroupingTestCase(unittest.TestCase):

Subscribers

People subscribed via source and target branches

to status/vote changes: