Some very nice tests there! To continue:
=== added file 'lib/lp/archivepublisher/tests/test_generate_extra_overrides.py'
+def file_contents(path): + """Return the contents of the file at path.""" + with open(path) as handle: + return handle.read()
Since you're only reading the file, there's probably no hurry to close this file handle. So you could just return “open(path).read().”
« Back to merge proposal
Some very nice tests there! To continue:
=== added file 'lib/lp/ archivepublishe r/tests/ test_generate_ extra_overrides .py'
+def file_contents( path):
+ """Return the contents of the file at path."""
+ with open(path) as handle:
+ return handle.read()
Since you're only reading the file, there's probably no hurry to close this file handle. So you could just return “open(path) .read() .”