

def test_processor_run_error_when_wrong_encoding(self):
    data_source = os.path.join(data_source.data_dir, 'hmt', 'BIS_spending_over__25_000_July_2014.csv')
    encoding = 'UTF-8'
    processor = processors.SchemaProcessor()
    (result, report, data) = processor.run(data_source=data_source, encoding=encoding, decode_strategy=None)
    generated_report = report.generate()
    report_results = generated_report['results']
    self.assertFalse(result)
    self.assertEqual(len(report_results), 1)
    self.assertEqual(report_results[0]['result_id'], 'data_decode_error')

dataset/ETHPy150Open frictionlessdata/goodtables/tests/test_schema.py TestSchemaProcessor.test_processor_run_error_when_wrong_encoding/VarMisuse@18/27 `self`->`data_source`