diff options
author | Leonard Richardson <leonard.richardson@canonical.com> | 2012-03-01 17:39:55 -0500 |
---|---|---|
committer | Leonard Richardson <leonard.richardson@canonical.com> | 2012-03-01 17:39:55 -0500 |
commit | 8333c2b5bfd78dfcc9544403a6e1d285f587475b (patch) | |
tree | 2bc9399b5a9a544cc0e5561516542365c4061c6e /bs4/tests/test_soup.py | |
parent | ad95318eb882a55a7a4bb692defdce8dee487cb6 (diff) |
For backwards compatibility, brought back the BeautifulStoneSoup class as a deprecated wrapper around BeautifulSoup.
Diffstat (limited to 'bs4/tests/test_soup.py')
-rw-r--r-- | bs4/tests/test_soup.py | 11 |
1 files changed, 10 insertions, 1 deletions
diff --git a/bs4/tests/test_soup.py b/bs4/tests/test_soup.py index 10a7e55..d826b25 100644 --- a/bs4/tests/test_soup.py +++ b/bs4/tests/test_soup.py @@ -2,7 +2,10 @@ """Tests of Beautiful Soup as a whole.""" import unittest -from bs4 import BeautifulSoup +from bs4 import ( + BeautifulSoup, + BeautifulStoneSoup, +) from bs4.element import ( SoupStrainer, NamespacedAttribute, @@ -44,6 +47,12 @@ class TestDeprecatedConstructorArguments(SoupTest): self.assertRaises( TypeError, self.soup, "<a>", no_such_argument=True) + def test_beautifulstonesoup(self): + with warnings.catch_warnings(record=True) as w: + soup = BeautifulStoneSoup("<markup>") + self.assertTrue(isinstance(soup, BeautifulSoup)) + self.assertTrue("BeautifulStoneSoup class is deprecated") + class TestSelectiveParsing(SoupTest): def test_parse_with_soupstrainer(self): |