summaryrefslogtreecommitdiff
path: root/cmdtest
diff options
context:
space:
mode:
authorLars Wirzenius <liw@liw.fi>2012-04-12 21:02:27 +0100
committerLars Wirzenius <liw@liw.fi>2012-04-12 21:02:27 +0100
commit6fa7a6a10629daf84dfc2b461ff50e84876bae30 (patch)
tree87ef43e201f8c36b2a82c6311c4cc9584f48eeec /cmdtest
parentf2cfe0ac186f0a475819ce5da3d8f9011fa13ddf (diff)
downloadcmdtest-6fa7a6a10629daf84dfc2b461ff50e84876bae30.tar.gz
Remove unnecessary write file
Diffstat (limited to 'cmdtest')
-rwxr-xr-xcmdtest10
1 files changed, 3 insertions, 7 deletions
diff --git a/cmdtest b/cmdtest
index 3b44afe..581b07a 100755
--- a/cmdtest
+++ b/cmdtest
@@ -206,15 +206,11 @@ class CommandTester(cliapp.Application):
return errors
def diff(self, expected_name, actual_name, diff_name):
- exit, out, err = self.runcmd_unchecked(['diff', '-u',
- expected_name, actual_name])
- self.write_file(diff_name, out)
+ argv = ['diff', '-u', expected_name, actual_name]
+ with open(diff_name, 'w') as f:
+ exit, out, err = self.runcmd_unchecked(argv, stdout=f)
return out
- def write_file(self, filename, content):
- with open(filename, 'w') as f:
- f.write(content)
-
def report_timings(self):
def report(key, title):