Merge lp://staging/~nmb/bzr/662509-ignore-blanks into lp://staging/bzr
Proposed by
Neil Martinsen-Burrell
Status: | Merged | ||||
---|---|---|---|---|---|
Merged at revision: | 5532 | ||||
Proposed branch: | lp://staging/~nmb/bzr/662509-ignore-blanks | ||||
Merge into: | lp://staging/bzr | ||||
Diff against target: |
156 lines (+53/-12) 4 files modified
bzrlib/tests/script.py (+22/-7) bzrlib/tests/test_script.py (+8/-0) doc/developers/testing.txt (+19/-5) doc/en/release-notes/bzr-2.3.txt (+4/-0) |
||||
To merge this branch: | bzr merge lp://staging/~nmb/bzr/662509-ignore-blanks | ||||
Related bugs: |
|
Reviewer | Review Type | Date Requested | Status |
---|---|---|---|
Vincent Ladeuil | Approve | ||
Martin Pool | Pending | ||
Poolie | Pending | ||
Review via email: mp+38889@code.staging.launchpad.net |
Commit message
Add 'ignore_output' parameter to run_script.
Description of the change
This change provides and ignore_blanks argument to run_script to allow for the previous default behavior of unspecified output not being matched.
To post a comment you must log in.
s/ignore_ blanks/ ignore_ output/ is almost my only comment.
This is exactly how I wanted to implement it.
When we add keywords arguments, we try to also use them as such so:
38 + def run_script(self, script, ignore_ blanks= False): runner. run_script( self, script, ignore_blanks)
39 + return self.script_
ignore_ output= ignore_ output
The idea is that if we add more mandatory arguments the above (erroneous) call *may* fail later, whereas using the keyword form ensures that it fails right there, at the call.
49 + def run_script(self, script, ignore_ blanks= False): runner. run_script( self, script, ignore_blanks)
50 + return self.script_
60 + return ScriptRunner( ).run_script( test_case, script_string, ignore_blanks)
idem
74 +If output occurs and no output is expected, the execution stops and the
75 +test fails. If unexpected output occurs on the standard error, then
76 +execution stops.
Good catch !
So ignore_output=False can even be check_output=True
+irrelevant, the run_script() method may be passed the keyword argument blanks= True``. For example:: blank_output( self):
101 +``ignore_
102 +
103 + def test_ignoring_
Don't forget to rename here too.
I let poolie be the second reviewer here but my 'NeedsFixing' vote is really bb:tweak.