diff options
Diffstat (limited to 'import-layers/yocto-poky/bitbake/lib/bs4/tests/test_builder_registry.py')
-rw-r--r-- | import-layers/yocto-poky/bitbake/lib/bs4/tests/test_builder_registry.py | 14 |
1 files changed, 10 insertions, 4 deletions
diff --git a/import-layers/yocto-poky/bitbake/lib/bs4/tests/test_builder_registry.py b/import-layers/yocto-poky/bitbake/lib/bs4/tests/test_builder_registry.py index 92ad10fb0..90cad8293 100644 --- a/import-layers/yocto-poky/bitbake/lib/bs4/tests/test_builder_registry.py +++ b/import-layers/yocto-poky/bitbake/lib/bs4/tests/test_builder_registry.py @@ -1,6 +1,7 @@ """Tests of the builder registry.""" import unittest +import warnings from bs4 import BeautifulSoup from bs4.builder import ( @@ -67,10 +68,15 @@ class BuiltInRegistryTest(unittest.TestCase): HTMLParserTreeBuilder) def test_beautifulsoup_constructor_does_lookup(self): - # You can pass in a string. - BeautifulSoup("", features="html") - # Or a list of strings. - BeautifulSoup("", features=["html", "fast"]) + + with warnings.catch_warnings(record=True) as w: + # This will create a warning about not explicitly + # specifying a parser, but we'll ignore it. + + # You can pass in a string. + BeautifulSoup("", features="html") + # Or a list of strings. + BeautifulSoup("", features=["html", "fast"]) # You'll get an exception if BS can't find an appropriate # builder. |