diff options
author | Leonard Richardson <leonardr@segfault.org> | 2019-07-21 15:50:49 -0400 |
---|---|---|
committer | Leonard Richardson <leonardr@segfault.org> | 2019-07-21 15:50:49 -0400 |
commit | 41c2b7c056e73c63c872eeb0a5e3a1f65473eaf0 (patch) | |
tree | 514f0a3ccd449c74d847917471ec6c09642e1318 /bs4/testing.py | |
parent | b2294f4f05d9e8583613560986f8aa64b18866b9 (diff) |
Implemented line number tracking for html5lib.
Diffstat (limited to 'bs4/testing.py')
-rw-r--r-- | bs4/testing.py | 17 |
1 files changed, 0 insertions, 17 deletions
diff --git a/bs4/testing.py b/bs4/testing.py index 3e8d15b..9f12e8d 100644 --- a/bs4/testing.py +++ b/bs4/testing.py @@ -790,23 +790,6 @@ Hello, world! soup = self.soup(BAD_DOCUMENT) self.linkage_validator(soup) - def test_tracking_line_numbers(self): - # In general, TreeBuilders do not keep track of - # line numbers from the original markup. Even if you - # ask for line numbers, we don't have 'em. - # - # This means that if you have a tag like <lineno> or <offset>, - # tag.lineno will find it rather than giving you a numeric - # answer. - # - # See HTMLParserTreeBuilderSmokeTest for a situation - # where the parser _does_ keep track of the line numbers. - soup = self.soup( - "\n <p>\n\n<lineno>\n<b>text</b></lineno><offset></p>", - store_line_numbers=True - ) - self.assertEqual("lineno", soup.p.lineno.name) - self.assertEqual("offset", soup.p.offset.name) class XMLTreeBuilderSmokeTest(object): |