48fa791b05d4047039432b9486932e8afaa4f0b5,integration_test/test_recipyrc.py,TestRecipyrc,test_data_file_diff_outputs,#TestRecipyrc#,173

Before Change


        
        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)
Italian Trulli
In pattern: SUPERPATTERN

Frequency: 4

Non-data size: 14

Instances


Project Name: recipy/recipy
Commit Name: 48fa791b05d4047039432b9486932e8afaa4f0b5
Time: 2016-10-19
Author: michaelj@epcc.ed.ac.uk
File Name: integration_test/test_recipyrc.py
Class Name: TestRecipyrc
Method Name: test_data_file_diff_outputs


Project Name: recipy/recipy
Commit Name: 48fa791b05d4047039432b9486932e8afaa4f0b5
Time: 2016-10-19
Author: michaelj@epcc.ed.ac.uk
File Name: integration_test/test_recipyrc.py
Class Name: TestRecipyrc
Method Name: test_data_file_diff_outputs


Project Name: recipy/recipy
Commit Name: 48fa791b05d4047039432b9486932e8afaa4f0b5
Time: 2016-10-19
Author: michaelj@epcc.ed.ac.uk
File Name: integration_test/test_recipyrc.py
Class Name: TestRecipyrc
Method Name: test_ignored_inputs_outputs


Project Name: recipy/recipy
Commit Name: 48fa791b05d4047039432b9486932e8afaa4f0b5
Time: 2016-10-19
Author: michaelj@epcc.ed.ac.uk
File Name: integration_test/test_recipyrc.py
Class Name: TestRecipyrc
Method Name: test_ignored_metadata_git


Project Name: recipy/recipy
Commit Name: 48fa791b05d4047039432b9486932e8afaa4f0b5
Time: 2016-10-19
Author: michaelj@epcc.ed.ac.uk
File Name: integration_test/test_recipyrc.py
Class Name: TestRecipyrc
Method Name: test_ignored_metadata_diff