MCPcopy
hub / github.com/scrapy/scrapy / test_decode_non_utf8

Method test_decode_non_utf8

tests/test_robotstxt_interface.py:129–132  ·  view source on GitHub ↗
(self)

Source from the content-addressed store, hash-verified

127 assert decoded_content == "User-agent: *\nDisallow: /\n"
128
129 def test_decode_non_utf8(self):
130 robotstxt_body = b"User-agent: *\n\xffDisallow: /\n"
131 decoded_content = decode_robotstxt(robotstxt_body, spider=None)
132 assert decoded_content == "User-agent: *\nDisallow: /\n"
133
134 # UTF-8 BOM at the beginning of the file ignored
135 def test_decode_utf8_bom(self):

Callers

nothing calls this directly

Calls 1

decode_robotstxtFunction · 0.90

Tested by

no test coverage detected