MCPcopy
hub / github.com/scrapy/scrapy / assertExportResult

Method assertExportResult

tests/test_exporters.py:290–297  ·  view source on GitHub ↗
(self, item, expected, **kwargs)

Source from the content-addressed store, hash-verified

288 )
289
290 def assertExportResult(self, item, expected, **kwargs):
291 fp = BytesIO()
292 ie = CsvItemExporter(fp, **kwargs)
293 ie.start_exporting()
294 ie.export_item(item)
295 ie.finish_exporting()
296 del ie # See the first “del self.ie” in this file for context.
297 self.assertCsvEqual(fp.getvalue(), expected)
298
299 def test_header_export_all(self):
300 self.assertExportResult(

Calls 5

export_itemMethod · 0.95
finish_exportingMethod · 0.95
assertCsvEqualMethod · 0.95
CsvItemExporterClass · 0.90
start_exportingMethod · 0.45

Tested by

no test coverage detected