Merge lp:~dholbach/click-reviewers-tools/scope-email into lp:click-reviewers-tools

Proposed by Daniel Holbach
Status: Superseded
Proposed branch: lp:~dholbach/click-reviewers-tools/scope-email
Merge into: lp:click-reviewers-tools
Diff against target: 80 lines (+38/-0)
3 files modified
clickreviews/cr_lint.py (+10/-0)
clickreviews/tests/test_cr_lint.py (+21/-0)
debian/changelog (+7/-0)
To merge this branch: bzr merge lp:~dholbach/click-reviewers-tools/scope-email
Reviewer Review Type Date Requested Status
Jamie Strandboge (community) Needs Fixing
Review via email: mp+228993@code.launchpad.net

This proposal has been superseded by a proposal from 2014-07-31.

To post a comment you must log in.
Revision history for this message
Jamie Strandboge (jdstrand) wrote :

This look fine except it is missing a corresponding test in clickreviews/tests/test_cr_lint.py. Can you add one (eg, add test_check_maintainer_email_special2()). Thanks!

review: Needs Fixing
222. By Daniel Holbach

add test-case for scope maintainer email special case

Unmerged revisions

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
1=== modified file 'clickreviews/cr_lint.py'
2--- clickreviews/cr_lint.py 2014-07-25 14:02:45 +0000
3+++ clickreviews/cr_lint.py 2014-07-31 12:33:59 +0000
4@@ -55,9 +55,16 @@
5 'com.ubuntu.developer.')
6 and self.email ==
7 'ubuntu-touch-coreapps@lists.launchpad.net')
8+ # "core scope" is not necessarily a word we use right now, but
9+ # we want to special case scopes which are written through our
10+ # vetted development process.
11+ self.is_core_scope = (self.click_pkgname.startswith('com.ubuntu.scopes.')
12+ and self.email ==
13+ 'ubuntu-devel-discuss@lists.ubuntu.com')
14 else:
15 self.email = None
16 self.is_core_app = False
17+ self.is_core_scope = False
18
19 self._list_all_compiled_binaries()
20
21@@ -548,6 +555,9 @@
22 else:
23 s = "OK (email=%s, package domain=%s)" % (self.email,
24 ".".join(pkg_domain_rev))
25+ elif self.is_core_scope:
26+ t = 'info'
27+ s = "OK ('com.ubuntu.scopes' uses '%s' as email)" % self.email
28 else:
29 t = 'error'
30 s = "email=%s does not match package domain=%s " \
31
32=== modified file 'clickreviews/tests/test_cr_lint.py'
33--- clickreviews/tests/test_cr_lint.py 2014-07-24 18:02:19 +0000
34+++ clickreviews/tests/test_cr_lint.py 2014-07-31 12:33:59 +0000
35@@ -527,6 +527,27 @@
36 "but special case"}
37 self.check_results(r, expected=expected)
38
39+ def test_check_maintainer_email_special2(self):
40+ '''Test check_maintainer() - ubuntu-devel-discuss@lists.ubuntu.com'''
41+ self.set_test_control("Package", "com.ubuntu.scopes.youtube")
42+ self.set_test_manifest("maintainer",
43+ "Ubuntu Core Developers "
44+ "<ubuntu-devel-discuss@lists.ubuntu.com>")
45+ c = ClickReviewLint(self.test_name)
46+ c.check_maintainer()
47+ r = c.click_report
48+ expected_counts = {'info': None, 'warn': 0, 'error': 0}
49+ self.check_results(r, expected_counts)
50+
51+ expected = dict()
52+ expected['info'] = dict()
53+ expected['warn'] = dict()
54+ expected['error'] = dict()
55+ expected['info']['lint_maintainer_domain'] = \
56+ {"text": "OK ('com.ubuntu.scopes' uses "
57+ "'ubuntu-devel-discuss@lists.ubuntu.com' as email)"}
58+ self.check_results(r, expected=expected)
59+
60 def test_check_icon(self):
61 '''Test check_icon()'''
62 self.set_test_manifest("icon", "someicon")
63
64=== modified file 'debian/changelog'
65--- debian/changelog 2014-07-30 16:33:54 +0000
66+++ debian/changelog 2014-07-31 12:33:59 +0000
67@@ -3,6 +3,13 @@
68 [ Jamie Strandboge ]
69 * data/frameworks.json: add ubuntu-sdk-14.10-qml-dev3
70
71+ [ Daniel Holbach ]
72+ * special-case 'com.ubuntu.scopes'.
73+
74+ [ Pete Woods ]
75+ * Match scope review with actual ini file specifications. (LP: #1350427)
76+ * Point to the correct scope ini path.
77+
78 -- Jamie Strandboge <jamie@ubuntu.com> Wed, 30 Jul 2014 11:31:41 -0500
79
80 click-reviewers-tools (0.8) utopic; urgency=medium

Subscribers

People subscribed via source and target branches