Merge lp:~rbalint/update-manager/fix-pep8-cosmic into lp:update-manager

Proposed by Balint Reczey
Status: Merged
Merged at revision: 2841
Proposed branch: lp:~rbalint/update-manager/fix-pep8-cosmic
Merge into: lp:update-manager
Diff against target: 555 lines (+112/-98)
21 files modified
UpdateManager/ChangelogViewer.py (+2/-2)
UpdateManager/Core/MetaRelease.py (+4/-4)
UpdateManager/Core/MyCache.py (+15/-15)
UpdateManager/Core/UpdateList.py (+15/-14)
UpdateManager/Core/utils.py (+1/-1)
UpdateManager/Dialogs.py (+2/-2)
UpdateManager/UpdateManager.py (+3/-3)
UpdateManager/UpdatesAvailable.py (+11/-11)
UpdateManager/backend/InstallBackendAptdaemon.py (+2/-2)
UpdateManager/backend/__init__.py (+10/-10)
debian/changelog (+13/-0)
debian/source_update-manager.py (+3/-3)
janitor/plugincore/manager.py (+6/-6)
janitor/plugincore/plugins/dpkg_status_plugin.py (+3/-3)
janitor/plugincore/plugins/kdelibs4to5_plugin.py (+2/-2)
janitor/plugincore/plugins/langpack_manual_plugin.py (+4/-4)
janitor/plugincore/tests/test_documentation.py (+4/-4)
tests/test_hwe_support_status.py (+5/-5)
tests/test_pep8.py (+1/-1)
tests/test_update_origin.py (+4/-4)
tests/test_utils.py (+2/-2)
To merge this branch: bzr merge lp:~rbalint/update-manager/fix-pep8-cosmic
Reviewer Review Type Date Requested Status
Brian Murray Approve
Review via email: mp+355774@code.launchpad.net
To post a comment you must log in.
Revision history for this message
Brian Murray (brian-murray) :
review: Approve

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
1=== modified file 'UpdateManager/ChangelogViewer.py'
2--- UpdateManager/ChangelogViewer.py 2017-08-07 19:42:06 +0000
3+++ UpdateManager/ChangelogViewer.py 2018-09-27 14:23:26 +0000
4@@ -162,8 +162,8 @@
5 # search for the next match in the buffer
6 for (start_str, end_list, url_prefix) in search_items:
7 # init
8- iter = buffer.get_iter_at_offset(iter_end.get_offset() -
9- len(content))
10+ iter = buffer.get_iter_at_offset(iter_end.get_offset() \
11+ - len(content))
12 while True:
13 ret = iter.forward_search(start_str,
14 Gtk.TextSearchFlags.VISIBLE_ONLY,
15
16=== modified file 'UpdateManager/Core/MetaRelease.py'
17--- UpdateManager/Core/MetaRelease.py 2018-08-29 07:37:52 +0000
18+++ UpdateManager/Core/MetaRelease.py 2018-09-27 14:23:26 +0000
19@@ -344,8 +344,8 @@
20 # sometime there is a root owned meta-relase file
21 # there, try to remove it so that we get it
22 # with proper permissions
23- if (os.path.exists(self.METARELEASE_FILE) and
24- not os.access(self.METARELEASE_FILE, os.W_OK)):
25+ if (os.path.exists(self.METARELEASE_FILE) \
26+ and not os.access(self.METARELEASE_FILE, os.W_OK)):
27 try:
28 os.unlink(self.METARELEASE_FILE)
29 except OSError as e:
30@@ -381,8 +381,8 @@
31 try:
32 self.parse()
33 except Exception as e:
34- logging.exception("parse failed for '%s'" %
35- self.METARELEASE_FILE)
36+ logging.exception("parse failed for '%s'" \
37+ % self.METARELEASE_FILE)
38 # no use keeping a broken file around
39 os.remove(self.METARELEASE_FILE)
40 # we don't want to keep a meta-release file around when it
41
42=== modified file 'UpdateManager/Core/MyCache.py'
43--- UpdateManager/Core/MyCache.py 2018-09-24 09:41:09 +0000
44+++ UpdateManager/Core/MyCache.py 2018-09-27 14:23:26 +0000
45@@ -84,8 +84,8 @@
46 # on broken packages, try to fix via saveDistUpgrade()
47 if self._depcache.broken_count > 0:
48 self.saveDistUpgrade()
49- assert (self._depcache.broken_count == 0 and
50- self._depcache.del_count == 0)
51+ assert (self._depcache.broken_count == 0 \
52+ and self._depcache.del_count == 0)
53 self.launchpad = None
54 # generate versioned_kernel_pkgs_regexp for later use
55 apt_versioned_kernel_pkgs = apt_pkg.config.value_list(
56@@ -154,8 +154,8 @@
57 continue
58 match = True
59 for base_dep in dep_or:
60- if (base_dep.name != target.package.shortname or
61- not apt_pkg.check_dep(
62+ if (base_dep.name != target.package.shortname \
63+ or not apt_pkg.check_dep(
64 target.version, base_dep.relation, base_dep.version)):
65 match = False
66 if match:
67@@ -170,8 +170,8 @@
68 candidate = cpkg.candidate
69 if candidate is not None:
70 if (self._check_dependencies(
71- target, candidate.get_dependencies("Conflicts")) and
72- self._check_dependencies(
73+ target, candidate.get_dependencies("Conflicts")) \
74+ and self._check_dependencies(
75 target, candidate.get_dependencies("Replaces"))):
76 logging.info(
77 "%s Conflicts/Replaces %s; allowing removal" % (
78@@ -192,8 +192,8 @@
79 wouldDelete -= 1
80 if wouldDelete > 0:
81 self.clear()
82- assert (self._depcache.broken_count == 0 and
83- self._depcache.del_count == 0)
84+ assert (self._depcache.broken_count == 0 \
85+ and self._depcache.del_count == 0)
86 else:
87 assert self._depcache.broken_count == 0
88 #self._apply_dselect_upgrade()
89@@ -259,7 +259,7 @@
90 #print(changelog.read())
91 # do only get the lines that are new
92 alllines = ""
93- regexp = "^%s \((.*)\)(.*)$" % (re.escape(srcpkg))
94+ regexp = "^%s \\((.*)\\)(.*)$" % (re.escape(srcpkg))
95
96 while True:
97 line = changelog.readline().decode("UTF-8", "replace")
98@@ -283,14 +283,14 @@
99 #
100 # for NEWS.Debian we do require the changelogver > installed
101 if strict_versioning:
102- if (installed and
103- apt_pkg.version_compare(changelogver,
104- installed) < 0):
105+ if (installed \
106+ and apt_pkg.version_compare(changelogver,
107+ installed) < 0):
108 break
109 else:
110- if (installed and
111- apt_pkg.version_compare(changelogver,
112- installed) == 0):
113+ if (installed \
114+ and apt_pkg.version_compare(changelogver,
115+ installed) == 0):
116 break
117 alllines = alllines + line
118 return alllines
119
120=== modified file 'UpdateManager/Core/UpdateList.py'
121--- UpdateManager/Core/UpdateList.py 2018-09-27 10:58:57 +0000
122+++ UpdateManager/Core/UpdateList.py 2018-09-27 14:23:26 +0000
123@@ -102,9 +102,9 @@
124 # This shouldn't really happen. If we land here often, it's a sign
125 # that something has gone wrong. Unless all pkgs are None it's not
126 # a critical issue - a hit to the performance at most.
127- reason = ((not pkg or not pkg.candidate) and
128- "Package was None or didn't have a candidate." or
129- "%s already in _deps." % pkg.name)
130+ reason = ((not pkg or not pkg.candidate) \
131+ and "Package was None or didn't have a candidate." \
132+ or "%s already in _deps." % pkg.name)
133 logging.debug("Useless call to _add_deps. %s" % reason)
134 return
135 if len(self._deps) % 200 == 0 and callable(eventloop_callback):
136@@ -140,8 +140,8 @@
137
138 def selection_is_inconsistent(self):
139 pkgs_installing = [item for item in self.items if item.is_selected()]
140- return (len(pkgs_installing) > 0 and
141- len(pkgs_installing) < len(self.items))
142+ return (len(pkgs_installing) > 0 \
143+ and len(pkgs_installing) < len(self.items))
144
145 def get_total_size(self):
146 if self.to_remove:
147@@ -338,9 +338,9 @@
148 inst_ver = pkg._pkg.current_ver
149 for ver in pkg._pkg.version_list:
150 # discard is < than installed ver
151- if (inst_ver and
152- apt.apt_pkg.version_compare(ver.ver_str,
153- inst_ver.ver_str) <= 0):
154+ if (inst_ver \
155+ and apt.apt_pkg.version_compare(ver.ver_str,
156+ inst_ver.ver_str) <= 0):
157 continue
158 # check if we have a match
159 for (verFileIter, index) in ver.file_list:
160@@ -507,14 +507,15 @@
161 upgrade_pkgs.append(pkg)
162 self.num_updates = self.num_updates + 1
163
164- if pkg.is_upgradable and not (pkg.marked_upgrade or
165- pkg.marked_install):
166+ if pkg.is_upgradable and not (pkg.marked_upgrade \
167+ or pkg.marked_install):
168 self.held_back.append(pkg.name)
169 continue
170- if (pkg.is_auto_removable and
171- (cache.versioned_kernel_pkgs_regexp and
172- cache.versioned_kernel_pkgs_regexp.match(pkg.name) and
173- not cache.running_kernel_pkgs_regexp.match(pkg.name))):
174+ if (pkg.is_auto_removable \
175+ and (cache.versioned_kernel_pkgs_regexp \
176+ and cache.versioned_kernel_pkgs_regexp.match(pkg.name) \
177+ and not cache.running_kernel_pkgs_regexp.match(
178+ pkg.name))):
179 kernel_autoremove_pkgs.append(pkg)
180
181 # perform operations after the loop to not skip packages which
182
183=== modified file 'UpdateManager/Core/utils.py'
184--- UpdateManager/Core/utils.py 2018-06-25 09:15:45 +0000
185+++ UpdateManager/Core/utils.py 2018-09-27 14:23:26 +0000
186@@ -318,7 +318,7 @@
187 if proxies:
188 # basic verification
189 for proxy in proxies.values():
190- if not re.match("https?://\w+", proxy):
191+ if not re.match("https?://\\w+", proxy):
192 print("proxy '%s' looks invalid" % proxy, file=sys.stderr)
193 return
194 proxy_support = ProxyHandler(proxies)
195
196=== modified file 'UpdateManager/Dialogs.py'
197--- UpdateManager/Dialogs.py 2018-09-06 07:09:47 +0000
198+++ UpdateManager/Dialogs.py 2018-09-27 14:23:26 +0000
199@@ -368,8 +368,8 @@
200 Dialog.start(self)
201 # Turn off close button
202 self.window_main.realize()
203- self.window_main.get_window().set_functions(Gdk.WMFunction.MOVE |
204- Gdk.WMFunction.MINIMIZE)
205+ self.window_main.get_window().set_functions(Gdk.WMFunction.MOVE \
206+ | Gdk.WMFunction.MINIMIZE)
207
208 def restart(self, *args, **kwargs):
209 self._request_reboot_via_session_manager()
210
211=== modified file 'UpdateManager/UpdateManager.py'
212--- UpdateManager/UpdateManager.py 2018-09-24 11:50:49 +0000
213+++ UpdateManager/UpdateManager.py 2018-09-27 14:23:26 +0000
214@@ -305,9 +305,9 @@
215
216 # Check for new fresh release
217 settings = Gio.Settings.new("com.ubuntu.update-manager")
218- if (self.meta_release.new_dist and
219- (self.options.check_dist_upgrades or
220- settings.get_boolean("check-dist-upgrades"))):
221+ if (self.meta_release.new_dist \
222+ and (self.options.check_dist_upgrades \
223+ or settings.get_boolean("check-dist-upgrades"))):
224 return DistUpgradeDialog(self, self.meta_release)
225
226 return None
227
228=== modified file 'UpdateManager/UpdatesAvailable.py'
229--- UpdateManager/UpdatesAvailable.py 2018-09-24 09:41:09 +0000
230+++ UpdateManager/UpdatesAvailable.py 2018-09-27 14:23:26 +0000
231@@ -531,12 +531,12 @@
232 # set descr
233 data = model.get_value(iter, LIST_UPDATE_DATA)
234 item = data.item
235- if (item is None and data.group is not None and
236- data.group.core_item is not None):
237+ if (item is None and data.group is not None \
238+ and data.group.core_item is not None):
239 item = data.group.core_item
240- if (item is None or item.pkg is None or
241- item.pkg.candidate is None or
242- item.pkg.candidate.description is None):
243+ if (item is None or item.pkg is None \
244+ or item.pkg.candidate is None \
245+ or item.pkg.candidate.description is None):
246 changes_buffer = self.textview_changes.get_buffer()
247 changes_buffer.set_text("")
248 desc_buffer = self.textview_descr.get_buffer()
249@@ -724,8 +724,8 @@
250 self.hbox_restart.set_visible(requires_restart)
251
252 def _refresh_updates_count(self):
253- self.button_install.set_sensitive(self.cache.install_count +
254- self.cache.del_count)
255+ self.button_install.set_sensitive(self.cache.install_count \
256+ + self.cache.del_count)
257 try:
258 inst_count = self.cache.install_count + self.cache.del_count
259 self.dl_size = self.cache.required_download
260@@ -889,8 +889,8 @@
261 self.vbox_alerts.show()
262 self.connected = False
263 # in doubt (STATE_UNKNOWN), assume connected
264- elif (state in NetworkManagerHelper.NM_STATE_CONNECTED_LIST or
265- state == NetworkManagerHelper.NM_STATE_UNKNOWN):
266+ elif (state in NetworkManagerHelper.NM_STATE_CONNECTED_LIST \
267+ or state == NetworkManagerHelper.NM_STATE_UNKNOWN):
268 self.updates_changed()
269 self.hbox_offline.hide()
270 self.connected = True
271@@ -1067,8 +1067,8 @@
272
273 self.treeview_update.set_model(self.store)
274 self.pkg_cell_area.indent_toplevel = (
275- bool(self.list.security_groups) or
276- bool(self.list.kernel_autoremove_groups))
277+ bool(self.list.security_groups) \
278+ or bool(self.list.kernel_autoremove_groups))
279 self.update_close_button()
280 self.update_count()
281 self.setBusy(False)
282
283=== modified file 'UpdateManager/backend/InstallBackendAptdaemon.py'
284--- UpdateManager/backend/InstallBackendAptdaemon.py 2018-09-24 11:50:49 +0000
285+++ UpdateManager/backend/InstallBackendAptdaemon.py 2018-09-27 14:23:26 +0000
286@@ -113,8 +113,8 @@
287 label_details.set_label(get_status_string_from_enum(status))
288 # Also resize the window if we switch from download details to
289 # the terminal window
290- if (status == STATUS_COMMITTING and expander and
291- expander.terminal.get_visible()):
292+ if status == STATUS_COMMITTING and expander \
293+ and expander.terminal.get_visible():
294 self._resize_to_show_details(expander)
295
296 @inline_callbacks
297
298=== modified file 'UpdateManager/backend/__init__.py'
299--- UpdateManager/backend/__init__.py 2018-09-11 13:51:21 +0000
300+++ UpdateManager/backend/__init__.py 2018-09-27 14:23:26 +0000
301@@ -40,17 +40,17 @@
302 fresh_cache = Cache(rootdir=self.window_main.cache.rootdir)
303 for pkg in self.window_main.cache:
304 try:
305- if pkg.marked_install and \
306- not fresh_cache[pkg.name].is_installed:
307+ if pkg.marked_install \
308+ and not fresh_cache[pkg.name].is_installed:
309 pkgname = pkg.name
310 if pkg.is_auto_installed:
311 pkgname += "#auto"
312 pkgs_install.append(pkgname)
313- elif (pkg.marked_upgrade and
314- fresh_cache[pkg.name].is_upgradable):
315+ elif (pkg.marked_upgrade \
316+ and fresh_cache[pkg.name].is_upgradable):
317 pkgs_upgrade.append(pkg.name)
318- elif (pkg.marked_delete and
319- fresh_cache[pkg.name].is_installed):
320+ elif (pkg.marked_delete \
321+ and fresh_cache[pkg.name].is_installed):
322 pkgs_remove.append(pkg.name)
323 except KeyError:
324 # pkg missing from fresh_cache can't be modified
325@@ -98,8 +98,8 @@
326 def get_backend(*args, **kwargs):
327 """Select and return a package manager backend."""
328 # try aptdaemon
329- if (os.path.exists("/usr/sbin/aptd") and
330- "UPDATE_MANAGER_FORCE_BACKEND_SYNAPTIC" not in os.environ):
331+ if (os.path.exists("/usr/sbin/aptd") \
332+ and "UPDATE_MANAGER_FORCE_BACKEND_SYNAPTIC" not in os.environ):
333 # check if the gtkwidgets are installed as well
334 try:
335 from .InstallBackendAptdaemon import InstallBackendAptdaemon
336@@ -108,8 +108,8 @@
337 import logging
338 logging.exception("importing aptdaemon")
339 # try synaptic
340- if (os.path.exists("/usr/sbin/synaptic") and
341- "UPDATE_MANAGER_FORCE_BACKEND_APTDAEMON" not in os.environ):
342+ if (os.path.exists("/usr/sbin/synaptic") \
343+ and "UPDATE_MANAGER_FORCE_BACKEND_APTDAEMON" not in os.environ):
344 from .InstallBackendSynaptic import InstallBackendSynaptic
345 return InstallBackendSynaptic(*args, **kwargs)
346 # nothing found, raise
347
348=== modified file 'debian/changelog'
349--- debian/changelog 2018-09-24 09:11:27 +0000
350+++ debian/changelog 2018-09-27 14:23:26 +0000
351@@ -1,3 +1,16 @@
352+update-manager (1:18.10.9) cosmic; urgency=medium
353+
354+ * Allow unselecting updates and performing only removals (LP: #1792320)
355+ * Stop trying apt_pkg.pkgsystem_(un)lock(), as a normal user it always fails
356+ * Keep or delete packages after looping over all of them.
357+ This prevents the resolver from changing the packages in the loop resulting
358+ in not keeping some phased packages back from being upgraded. (LP: #1072136)
359+ * Fix PEP 8 warnings
360+ Also ignore "E502 the backslash is redundant between brackets" because the
361+ additional brackets help readability.
362+
363+ -- Balint Reczey <rbalint@ubuntu.com> Thu, 27 Sep 2018 15:19:02 +0200
364+
365 update-manager (1:18.10.8) cosmic; urgency=medium
366
367 * Print transaction error and let the user try again applying updates
368
369=== modified file 'debian/source_update-manager.py'
370--- debian/source_update-manager.py 2017-08-07 20:54:58 +0000
371+++ debian/source_update-manager.py 2018-09-27 14:23:26 +0000
372@@ -27,9 +27,9 @@
373 elif sp.returncode == 10:
374 res = out.strip()
375 else:
376- res = (b'Error: command ' + str(command).encode() +
377- b' failed with exit code ' +
378- str(sp.returncode).encode() + b': ' + out)
379+ res = (b'Error: command ' + str(command).encode() \
380+ + b' failed with exit code ' \
381+ + str(sp.returncode).encode() + b': ' + out)
382 return res
383
384
385
386=== modified file 'janitor/plugincore/manager.py'
387--- janitor/plugincore/manager.py 2012-06-28 00:11:57 +0000
388+++ janitor/plugincore/manager.py 2018-09-27 14:23:26 +0000
389@@ -81,9 +81,9 @@
390 """Find and instantiate all plugins in a module."""
391 def is_plugin(target):
392 # Don't return the base class itself.
393- return (inspect.isclass(target) and
394- issubclass(target, Plugin) and
395- target is not Plugin)
396+ return (inspect.isclass(target) \
397+ and issubclass(target, Plugin) \
398+ and target is not Plugin)
399 plugin_classes = [
400 member
401 for name, member in inspect.getmembers(module, is_plugin)
402@@ -177,9 +177,9 @@
403 # condition.
404 plugins = [
405 plugin for plugin in self._plugins
406- if (plugin.condition == condition or
407- condition in plugin.condition or
408- condition == '*')
409+ if (plugin.condition == condition \
410+ or condition in plugin.condition \
411+ or condition == '*')
412 ]
413 logging.debug("plugins for condition '{}' are '{}'".format(
414 condition, plugins))
415
416=== modified file 'janitor/plugincore/plugins/dpkg_status_plugin.py'
417--- janitor/plugincore/plugins/dpkg_status_plugin.py 2012-06-27 21:49:20 +0000
418+++ janitor/plugincore/plugins/dpkg_status_plugin.py 2018-09-27 14:23:26 +0000
419@@ -70,9 +70,9 @@
420 while tagf.step():
421 statusline = tagf.section.get('Status')
422 (want, flag, status) = statusline.split()
423- if (want == 'purge' and
424- flag == 'ok' and
425- status == 'not-installed'):
426+ if want == 'purge' \
427+ and flag == 'ok' \
428+ and status == 'not-installed':
429 # Then...
430 n_cruft += 1
431 logging.debug('DpkgStatusPlugin found {} cruft items'.format(n_cruft))
432
433=== modified file 'janitor/plugincore/plugins/kdelibs4to5_plugin.py'
434--- janitor/plugincore/plugins/kdelibs4to5_plugin.py 2012-06-27 21:49:20 +0000
435+++ janitor/plugincore/plugins/kdelibs4to5_plugin.py 2018-09-27 14:23:26 +0000
436@@ -43,8 +43,8 @@
437 fromp = 'kdelibs4-dev'
438 top = 'kdelibs5-dev'
439 cache = self.app.apt_cache
440- if (fromp in cache and cache[fromp].is_installed and
441- top in cache and not cache[top].is_installed):
442+ if (fromp in cache and cache[fromp].is_installed \
443+ and top in cache and not cache[top].is_installed):
444 yield MissingPackageCruft(
445 cache[top],
446 _('When upgrading, if kdelibs4-dev is installed, '
447
448=== modified file 'janitor/plugincore/plugins/langpack_manual_plugin.py'
449--- janitor/plugincore/plugins/langpack_manual_plugin.py 2012-06-27 21:49:20 +0000
450+++ janitor/plugincore/plugins/langpack_manual_plugin.py 2018-09-27 14:23:26 +0000
451@@ -68,10 +68,10 @@
452 # language-support-* - we fix this here
453 cache = self.app.apt_cache
454 for pkg in cache:
455- if (pkg.name.startswith('language-pack-') and
456- not pkg.name.endswith('-base') and
457- cache._depcache.IsAutoInstalled(pkg._pkg) and
458- pkg.is_installed):
459+ if (pkg.name.startswith('language-pack-') \
460+ and not pkg.name.endswith('-base') \
461+ and cache._depcache.IsAutoInstalled(pkg._pkg) \
462+ and pkg.is_installed):
463 # Then...
464 logging.debug("setting '%s' to manual installed" % pkg.name)
465 yield ManualInstallCruft(pkg)
466
467=== modified file 'janitor/plugincore/tests/test_documentation.py'
468--- janitor/plugincore/tests/test_documentation.py 2017-08-07 20:54:58 +0000
469+++ janitor/plugincore/tests/test_documentation.py 2018-09-27 14:23:26 +0000
470@@ -34,10 +34,10 @@
471 COMMASPACE = ', '
472 DOT = '.'
473 DOCTEST_FLAGS = (
474- doctest.ELLIPSIS |
475- doctest.NORMALIZE_WHITESPACE |
476- doctest.REPORT_NDIFF |
477- doctest.IGNORE_EXCEPTION_DETAIL)
478+ doctest.ELLIPSIS \
479+ | doctest.NORMALIZE_WHITESPACE \
480+ | doctest.REPORT_NDIFF \
481+ | doctest.IGNORE_EXCEPTION_DETAIL)
482
483
484 WHOAMI = 'janitor.plugincore'
485
486=== modified file 'tests/test_hwe_support_status.py'
487--- tests/test_hwe_support_status.py 2017-08-07 20:54:58 +0000
488+++ tests/test_hwe_support_status.py 2018-09-27 14:23:26 +0000
489@@ -38,14 +38,14 @@
490 )
491
492 INSTALLED_UNSUPPORTED_HWE_PKG_NAMES = (
493- INSTALLED_UNSUPPORTED_HWE_KERNEL_PKG_NAMES +
494- INSTALLED_UNSUPPORTED_HWE_XORG_PKG_NAMES)
495+ INSTALLED_UNSUPPORTED_HWE_KERNEL_PKG_NAMES \
496+ + INSTALLED_UNSUPPORTED_HWE_XORG_PKG_NAMES)
497
498 def setUp(self):
499 self.cache = []
500- INSTALL = (self.INSTALLED_UNSUPPORTED_HWE_PKG_NAMES +
501- self.INSTALLED_SUPPORTED_HWE_PKG_NAMES +
502- self.INSTALLED_OTHER_PKG_NAMES)
503+ INSTALL = (self.INSTALLED_UNSUPPORTED_HWE_PKG_NAMES \
504+ + self.INSTALLED_SUPPORTED_HWE_PKG_NAMES \
505+ + self.INSTALLED_OTHER_PKG_NAMES)
506 for name in INSTALL:
507 self.cache.append(make_mock_pkg(name))
508
509
510=== modified file 'tests/test_pep8.py'
511--- tests/test_pep8.py 2017-08-07 20:54:58 +0000
512+++ tests/test_pep8.py 2018-09-27 14:23:26 +0000
513@@ -6,7 +6,7 @@
514 import unittest
515
516 # pep8 is overdoing it a bit IMO
517-IGNORE_PEP8 = "E265,E402"
518+IGNORE_PEP8 = "E265,E402,E502"
519 IGNORE_FILES = (
520 )
521
522
523=== modified file 'tests/test_update_origin.py'
524--- tests/test_update_origin.py 2017-09-11 10:39:17 +0000
525+++ tests/test_update_origin.py 2018-09-27 14:23:26 +0000
526@@ -90,10 +90,10 @@
527 if o.archive == "xenial-security":
528 had_security = True
529 break
530- if (is_in_updates and
531- not is_in_security and
532- had_security and
533- len(pkg._pkg.version_list) > 2):
534+ if (is_in_updates \
535+ and not is_in_security \
536+ and had_security \
537+ and len(pkg._pkg.version_list) > 2):
538 test_pkgs.add(pkg.name)
539 self.assertTrue(len(test_pkgs) > 0,
540 "no suitable test package found that has a version in "
541
542=== modified file 'tests/test_utils.py'
543--- tests/test_utils.py 2017-08-30 16:55:46 +0000
544+++ tests/test_utils.py 2018-09-27 14:23:26 +0000
545@@ -32,8 +32,8 @@
546 mock.mock_open(read_data=data)) as mock_file:
547 assert open("/proc/1/stat").read() == data
548 mock_file.assert_called_with("/proc/1/stat")
549- self.assertTrue(utils.is_child_of_process_name("init") or
550- utils.is_child_of_process_name("systemd"))
551+ self.assertTrue(utils.is_child_of_process_name("init") \
552+ or utils.is_child_of_process_name("systemd"))
553 self.assertFalse(utils.is_child_of_process_name("mvo"))
554
555 def test_is_port_listening(self):

Subscribers

People subscribed via source and target branches

to status/vote changes: