* [PATCH] lib/bs4/testing.py: fix bs4 testing
@ 2020-05-04 12:32 Frazer Clews
2020-05-04 13:02 ` ✗ patchtest: failure for " Patchwork
0 siblings, 1 reply; 2+ messages in thread
From: Frazer Clews @ 2020-05-04 12:32 UTC (permalink / raw)
To: openembedded-core; +Cc: Frazer Clews
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(-)
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
^ permalink raw reply related [flat|nested] 2+ messages in thread
end of thread, other threads:[~2020-05-04 13:02 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2020-05-04 12:32 [PATCH] lib/bs4/testing.py: fix bs4 testing Frazer Clews
2020-05-04 13:02 ` ✗ patchtest: failure for " Patchwork
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox