[bitbake-devel] lib/bs4/testing.py: fix bs4 testing

Submitted by Frazer Leslie Clews on May 4, 2020, 1:26 p.m. | Patch ID: 172265

Details

Message ID 20200504132618.159099-1-frazer.clews@codethink.co.uk
State New
Headers show

Commit Message

Frazer Leslie Clews May 4, 2020, 1:26 p.m.
From: Frazer Clews <frazer.clews@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.clews@codethink.co.uk>
---
 lib/bs4/testing.py | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)

Patch hide | download patch | download mbox

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