diff options
Diffstat (limited to 'bs4/tests/test_lxml.py')
-rw-r--r-- | bs4/tests/test_lxml.py | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/bs4/tests/test_lxml.py b/bs4/tests/test_lxml.py index 39e4bd4..80458de 100644 --- a/bs4/tests/test_lxml.py +++ b/bs4/tests/test_lxml.py @@ -10,6 +10,7 @@ try: LXML_VERSION = lxml.etree.LXML_VERSION except ImportError, e: LXML_PRESENT = False + LXML_VERSION = (0,) from bs4 import ( BeautifulSoup, @@ -47,7 +48,7 @@ class LXMLTreeBuilderSmokeTest(SoupTest, HTMLTreeBuilderSmokeTest): # test if an old version of lxml is installed. @skipIf( - LXML_VERSION < (2,3,5,0), + not LXML_PRESENT or LXML_VERSION < (2,3,5,0), "Skipping doctype test for old version of lxml to avoid segfault.") def test_empty_doctype(self): soup = self.soup("<!DOCTYPE>") |