Merge lp:~brian.curtin/ubuntuone-dev-tools/py3-map-list into lp:ubuntuone-dev-tools

Proposed by Brian Curtin on 2012-08-27
Status: Merged
Approved by: Brian Curtin on 2012-08-28
Approved revision: 93
Merged at revision: 93
Proposed branch: lp:~brian.curtin/ubuntuone-dev-tools/py3-map-list
Merge into: lp:ubuntuone-dev-tools
Diff against target: 19 lines (+2/-2)
1 file modified
ubuntuone/devtools/runners/__init__.py (+2/-2)
To merge this branch: bzr merge lp:~brian.curtin/ubuntuone-dev-tools/py3-map-list
Reviewer Review Type Date Requested Status
Manuel de la Peña (community) 2012-08-27 Approve on 2012-08-28
Review via email: mp+121478@code.launchpad.net

Commit Message

- Store a list for ignore keys rather than a list on Python 2 and an iterator on Python 3

Description of the Change

Explicitly store a list for the ignore-* keys rather than whatever map returns. In Python 2 this is a list, Python 3 has this as an iterator.

To post a comment you must log in.
Manuel de la Peña (mandel) 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 'ubuntuone/devtools/runners/__init__.py'
2--- ubuntuone/devtools/runners/__init__.py 2012-08-21 21:43:27 +0000
3+++ ubuntuone/devtools/runners/__init__.py 2012-08-27 19:23:21 +0000
4@@ -213,13 +213,13 @@
5 """Comma-separate list of test modules to ignore,
6 e.g: test_gtk.py, test_account.py
7 """
8- self['ignore-modules'] = map(text_type.strip, option.split(','))
9+ self['ignore-modules'] = list(map(text_type.strip, option.split(',')))
10
11 def opt_ignore_paths(self, option):
12 """Comma-separated list of relative paths to ignore,
13 e.g: tests/platform/windows, tests/platform/macosx
14 """
15- self['ignore-paths'] = map(text_type.strip, option.split(','))
16+ self['ignore-paths'] = list(map(text_type.strip, option.split(',')))
17
18 def opt_loop(self, option):
19 """Loop tests the specified number of times."""

Subscribers

People subscribed via source and target branches

to all changes: