summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--NEWS.txt5
-rw-r--r--bs4/tests/test_lxml.py5
-rw-r--r--bs4/tests/test_soup.py9
3 files changed, 8 insertions, 11 deletions
diff --git a/NEWS.txt b/NEWS.txt
index e84e734..56397e5 100644
--- a/NEWS.txt
+++ b/NEWS.txt
@@ -1,3 +1,8 @@
+= 4.3.2 (Unreleased) =
+
+* Combined two tests to stop a spurious test failure when tests are
+ run by nodetests. [bug=1212445]
+
= 4.3.1 (20130815) =
* Fixed yet another problem with the html5lib tree builder, caused by
diff --git a/bs4/tests/test_lxml.py b/bs4/tests/test_lxml.py
index 27cb2d9..2b2e9b7 100644
--- a/bs4/tests/test_lxml.py
+++ b/bs4/tests/test_lxml.py
@@ -60,9 +60,10 @@ class LXMLTreeBuilderSmokeTest(SoupTest, HTMLTreeBuilderSmokeTest):
def test_beautifulstonesoup_is_xml_parser(self):
# Make sure that the deprecated BSS class uses an xml builder
# if one is installed.
- with warnings.catch_warnings(record=False) as w:
+ with warnings.catch_warnings(record=True) as w:
soup = BeautifulStoneSoup("<b />")
- self.assertEqual(u"<b/>", unicode(soup.b))
+ self.assertEqual(u"<b/>", unicode(soup.b))
+ self.assertTrue("BeautifulStoneSoup class is deprecated" in str(w[0].message))
def test_real_xhtml_document(self):
"""lxml strips the XML definition from an XHTML doc, which is fine."""
diff --git a/bs4/tests/test_soup.py b/bs4/tests/test_soup.py
index 910b37e..de93513 100644
--- a/bs4/tests/test_soup.py
+++ b/bs4/tests/test_soup.py
@@ -59,15 +59,6 @@ class TestDeprecatedConstructorArguments(SoupTest):
self.assertRaises(
TypeError, self.soup, "<a>", no_such_argument=True)
- @skipIf(
- not LXML_PRESENT,
- "lxml not present, not testing BeautifulStoneSoup.")
- 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" in str(w[0].message))
-
class TestWarnings(SoupTest):
def test_disk_file_warning(self):