recipyrc = recipyenv.get_recipyrc()
helpers.update_recipyrc(recipyrc, "data", "file_diff_outputs")
exit_code, _ = self.run_script()
assert exit_code == 0, ("Unexpected exit code " + str(exit_code))
_, filediffs = helpers.get_log(recipyenv.get_recipydb())
assert filediffs is None, "Expected filediffs to be None"
exit_code, _ = self.run_script()
assert exit_code == 0, ("Unexpected exit code " + str(exit_code))
_, filediffs = helpers.get_log(recipyenv.get_recipydb())
assert filediffs is not None, "Expected filediffs not to be None"
assert filediffs["filename"] == self.output_file,\
After Change
assert len(files) >= 1, "Unexpected number of files"
assert not isinstance(files[0], list), "Unexpected list"
def test_data_file_diff_outputs(self):
If [data].file_diff_outputs is present then:
* If output files are created, then there are no "filediffs"
for the run.
* If output files with the same content are created, then
there are "filediffs" for the run, with an empty "diffs"
value.
recipyrc = recipyenv.get_recipyrc()
helpers.update_recipyrc(recipyrc, "data", "file_diff_outputs")
helpers.execute_python([self.script, self.input_file,
self.output_file])
_, filediffs = helpers.get_log(recipyenv.get_recipydb())
assert filediffs is None, "Expected filediffs to be None"
helpers.execute_python([self.script, self.input_file,
self.output_file])
_, filediffs = helpers.get_log(recipyenv.get_recipydb())
assert filediffs is not None, "Expected filediffs not to be None"
assert filediffs["filename"] == self.output_file,\
("Expected filediffs["filename"] to be " + self.output_file)