Skip to content

Commit

Permalink
Merge branch 'master' of git+ssh://github.com/lxml/lxml
Browse files Browse the repository at this point in the history
  • Loading branch information
scoder committed Apr 5, 2024
2 parents 407dbb4 + b26d189 commit 8936f7a
Showing 1 changed file with 10 additions and 1 deletion.
11 changes: 10 additions & 1 deletion src/lxml/html/tests/test_feedparser_data.py
Expand Up @@ -9,7 +9,11 @@
from lxml.tests.common_imports import doctest
from lxml.doctestcompare import LHTMLOutputChecker

from lxml.html.clean import clean, Cleaner
try:
from lxml.html.clean import clean, Cleaner
html_clean_available = True
except ImportError:
html_clean_available = False

feed_dirs = [
os.path.join(os.path.dirname(__file__), 'feedparser-data'),
Expand Down Expand Up @@ -80,6 +84,11 @@ def shortDescription(self):

def test_suite():
suite = unittest.TestSuite()

if not html_clean_available:
print("Skipping tests in feedparser_data - external lxml_html_clean package is not installed")
return suite

for dir in feed_dirs:
for fn in os.listdir(dir):
fn = os.path.join(dir, fn)
Expand Down

0 comments on commit 8936f7a

Please sign in to comment.