MCPcopy
hub / github.com/scrapy/scrapy / test_decode_utf8_bom

Method test_decode_utf8_bom

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

Source from the content-addressed store, hash-verified

133
134 # UTF-8 BOM at the beginning of the file ignored
135 def test_decode_utf8_bom(self):
136 robotstxt_body = b"\xef\xbb\xbfUser-agent: *\nDisallow: /\n"
137 decoded_content = decode_robotstxt(robotstxt_body, spider=None)
138 assert decoded_content == "User-agent: *\nDisallow: /\n"
139
140
141class TestPythonRobotParser(BaseRobotParserTest):

Callers

nothing calls this directly

Calls 1

decode_robotstxtFunction · 0.90

Tested by

no test coverage detected