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.
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
101 +``ignore_blanks=True``. For example::
102 +
103 + def test_ignoring_blank_output(self):
Don't forget to rename here too.
I let poolie be the second reviewer here but my 'NeedsFixing' vote is really bb:tweak.
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.