MCPcopy Index your code
hub / github.com/python/cpython / test_noscript_content

Method test_noscript_content

Lib/test/test_htmlparser.py:432–452  ·  view source on GitHub ↗
(self)

Source from the content-addressed store, hash-verified

430 ])
431
432 def test_noscript_content(self):
433 source = f"<noscript>{SAMPLE_RAWTEXT}</noscript>"
434 # scripting=False -- normal mode
435 self._run_check(source, [
436 ('starttag', 'noscript', []),
437 ('comment', ' not a comment '),
438 ('starttag', 'not', [('a', 'start tag')]),
439 ('unknown decl', 'CDATA[not a cdata'),
440 ('comment', 'not a bogus comment'),
441 ('endtag', 'not'),
442 ('data', '☃'),
443 ('entityref', 'amp'),
444 ('charref', '9786'),
445 ('endtag', 'noscript'),
446 ])
447 # scripting=True -- RAWTEXT mode
448 self._run_check(source, [
449 ("starttag", "noscript", []),
450 ("data", SAMPLE_RAWTEXT),
451 ("endtag", "noscript"),
452 ], collector=EventCollector(scripting=True))
453
454 def test_plaintext_content(self):
455 content = SAMPLE_RAWTEXT + '</plaintext>' # not closing

Callers

nothing calls this directly

Calls 2

EventCollectorClass · 0.85
_run_checkMethod · 0.80

Tested by

no test coverage detected