From a4a7c6cb92f550c4a6b992c70fd035240da772e7 Mon Sep 17 00:00:00 2001 From: Leonard Richardson Date: Mon, 19 Aug 2013 10:31:36 -0400 Subject: Combined two tests to stop a spurious test failure when tests are run by nodetests. [bug=1212445] --- bs4/tests/test_lxml.py | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) (limited to 'bs4/tests/test_lxml.py') 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("") - self.assertEqual(u"", unicode(soup.b)) + self.assertEqual(u"", 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.""" -- cgit v1.2.3