MCPcopy
hub / github.com/scrapy/scrapy / test_download_error_long

Method test_download_error_long

tests/test_logformatter.py:160–169  ·  view source on GitHub ↗
(self)

Source from the content-addressed store, hash-verified

158 assert logline == "Error downloading <GET http://www.example.com>"
159
160 def test_download_error_long(self):
161 # In practice, the complete traceback is shown by passing the
162 # 'exc_info' argument to the logging function
163 failure = Failure(Exception())
164 request = Request("http://www.example.com")
165 logkws = self.formatter.download_error(
166 failure, request, self.spider, "Some message"
167 )
168 logline = logkws["msg"] % logkws["args"]
169 assert logline == "Error downloading <GET http://www.example.com>: Some message"
170
171 def test_scraped(self):
172 item = CustomItem()

Callers

nothing calls this directly

Calls 2

RequestClass · 0.90
download_errorMethod · 0.80

Tested by

no test coverage detected