From: Frazer Clews <frazer.cl...@codethink.co.uk> Have classes actually inherit SoupTest so it can use it's original methods, also correctly import HTMLParserTreeBuilder
Signed-off-by: Frazer Clews <frazer.cl...@codethink.co.uk> --- lib/bs4/testing.py | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/lib/bs4/testing.py b/lib/bs4/testing.py index 953bca8e..6584ecf3 100644 --- a/lib/bs4/testing.py +++ b/lib/bs4/testing.py @@ -15,7 +15,7 @@ from bs4.element import ( SoupStrainer, ) -from bs4.builder import HTMLParserTreeBuilder +from bs4.builder._htmlparser import HTMLParserTreeBuilder default_builder = HTMLParserTreeBuilder @@ -56,7 +56,7 @@ class SoupTest(unittest.TestCase): self.assertEqual(earlier, e.previous_element) earlier = e -class HTMLTreeBuilderSmokeTest(object): +class HTMLTreeBuilderSmokeTest(SoupTest): """A basic test of a treebuilder's competence. @@ -541,7 +541,7 @@ Hello, world! data.a['foo'] = 'bar' self.assertEqual('<a foo="bar">text</a>', data.a.decode()) -class XMLTreeBuilderSmokeTest(object): +class XMLTreeBuilderSmokeTest(SoupTest): def test_pickle_and_unpickle_identity(self): # Pickling a tree, then unpickling it, yields a tree identical -- 2.26.2
-=-=-=-=-=-=-=-=-=-=-=- Links: You receive all messages sent to this group. View/Reply Online (#137818): https://lists.openembedded.org/g/openembedded-core/message/137818 Mute This Topic: https://lists.openembedded.org/mt/73973690/21656 Group Owner: openembedded-core+ow...@lists.openembedded.org Unsubscribe: https://lists.openembedded.org/g/openembedded-core/leave/8023207/1426099254/xyzzy [arch...@mail-archive.com] -=-=-=-=-=-=-=-=-=-=-=-