Merge lp:~dobey/ubuntuone-dev-tools/fix-coverage into lp:ubuntuone-dev-tools

Proposed by dobey on 2012-08-03
Status: Merged
Approved by: Roberto Alsina on 2012-08-09
Approved revision: 79
Merged at revision: 78
Proposed branch: lp:~dobey/ubuntuone-dev-tools/fix-coverage
Merge into: lp:ubuntuone-dev-tools
Diff against target: 32 lines (+9/-2)
1 file modified
ubuntuone/devtools/runners/txrunner.py (+9/-2)
To merge this branch: bzr merge lp:~dobey/ubuntuone-dev-tools/fix-coverage
Reviewer Review Type Date Requested Status
Roberto Alsina (community) Approve on 2012-08-09
Brian Curtin (community) 2012-08-03 Approve on 2012-08-09
Review via email: mp+118207@code.launchpad.net

Commit Message

Add the necessary function definitions for twisted OptionsParser to handle
the coverage flag correctly

To post a comment you must log in.
review: Approve
79. By dobey on 2012-08-09

Remove the empty print and add an \n to previous print statement

Roberto Alsina (ralsina) :
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/txrunner.py'
2--- ubuntuone/devtools/runners/txrunner.py 2012-07-27 19:02:53 +0000
3+++ ubuntuone/devtools/runners/txrunner.py 2012-08-09 20:37:21 +0000
4@@ -25,6 +25,9 @@
5 # version. If you delete this exception statement from all source
6 # files in the program, then also delete it here.
7 """The twisted test runner and options."""
8+
9+from __future__ import print_function, unicode_literals
10+
11 import sys
12
13 from twisted.scripts import trial
14@@ -110,12 +113,16 @@
15 super(TestOptions, self).__init__(*args, **kwargs)
16 self['rterrors'] = True
17
18+ def opt_coverage(self, option):
19+ """Handle special flags."""
20+ self['coverage'] = True
21+ opt_c = opt_coverage
22+
23 def opt_help_reactors(self):
24 """Help on available reactors for use with tests"""
25 synopsis = ('')
26 print(synopsis)
27- print('Need to get list of reactors and print them here.')
28- print()
29+ print('Need to get list of reactors and print them here.\n')
30 sys.exit(0)
31
32 def opt_reactor(self, option):

Subscribers

People subscribed via source and target branches

to all changes: