def test_reads_mix_of_input_types_correctly(self): """Parser should process a mix of files and ignore non-result files.""" actual_results = read_results.parse_files( [add_testdata_prefix(RAW_RESULT_FILENAME), add_testdata_prefix(RESULT_PACKAGE_FILENAME), add_testdata_prefix(GARBAGE_FILENAME)]) # yapf: disable expected_results = { RAW_RESULT_FILENAME: RAW_RESULT, PACKAGED_RESULT_FILENAME: PACKAGED_RESULT, } self.assertDictEqual(expected_results, actual_results)
def test_reads_packaged_result_file_correctly(self): actual_results = read_results.parse_files( [add_testdata_prefix(RESULT_PACKAGE_FILENAME)]) expected_results = {PACKAGED_RESULT_FILENAME: PACKAGED_RESULT} self.assertDictEqual(expected_results, actual_results)
def test_reads_raw_result_file_correctly(self): actual_results = read_results.parse_files( [add_testdata_prefix(RAW_RESULT_FILENAME)]) expected_results = {RAW_RESULT_FILENAME: RAW_RESULT} self.assertDictEqual(expected_results, actual_results)
def test_reads_packaged_result_file_correctly(self): actual_results = read_results.parse_files([add_testdata_prefix( RESULT_PACKAGE_FILENAME)]) expected_results = {PACKAGED_RESULT_FILENAME: PACKAGED_RESULT} self.assertDictEqual(expected_results, actual_results)
def test_reads_raw_result_file_correctly(self): actual_results = read_results.parse_files([add_testdata_prefix( RAW_RESULT_FILENAME)]) expected_results = {RAW_RESULT_FILENAME: RAW_RESULT} self.assertDictEqual(expected_results, actual_results)