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
=== modified file 'tests/test_update_list.py'
--- tests/test_update_list.py 2013-06-06 05:50:56 +0000
+++ tests/test_update_list.py 2014-03-20 22:19:21 +0000
@@ -51,7 +51,9 @@
51 def test_second_phased_binary_not_included(self):51 def test_second_phased_binary_not_included(self):
52 """ Test that there is no overlap between the source packages of the52 """ Test that there is no overlap between the source packages of the
53 packages being ignored and installed """53 packages being ignored and installed """
54 self.updates_list.update(self.cache)54 with patch.object(self.updates_list.random, "randint") as mock_randint:
55 mock_randint.return_value = 0
56 self.updates_list.update(self.cache)
55 ignored_srcs = set([pkg.candidate.source_name for pkg in57 ignored_srcs = set([pkg.candidate.source_name for pkg in
56 self.updates_list.ignored_phased_updates])58 self.updates_list.ignored_phased_updates])
57 group = self.updates_list.update_groups[0]59 group = self.updates_list.update_groups[0]
@@ -92,7 +94,7 @@
92 with patch.object(self.updates_list.random, "randint") as mock_randint:94 with patch.object(self.updates_list.random, "randint") as mock_randint:
93 mock_randint.return_value = 10095 mock_randint.return_value = 100
94 self.updates_list.update(self.cache)96 self.updates_list.update(self.cache)
95 self.assertUpdatesListLen(3)97 self.assertUpdatesListLen(3)
9698
9799
98class GroupingTestCase(unittest.TestCase):100class GroupingTestCase(unittest.TestCase):

Subscribers

People subscribed via source and target branches

to status/vote changes: