From 9d43a6e4580a2626b3c60847b8783bd4dc6690fb Mon Sep 17 00:00:00 2001 From: Fangchen Li Date: Fri, 5 Mar 2021 07:55:57 -0600 Subject: [PATCH] Backport PR #40233: DEPS: skip html tests if html5lib is not installed #40198 --- pandas/tests/io/test_html.py | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/pandas/tests/io/test_html.py b/pandas/tests/io/test_html.py index aed1aaedf2fa3..aedb87eb44797 100644 --- a/pandas/tests/io/test_html.py +++ b/pandas/tests/io/test_html.py @@ -66,6 +66,7 @@ def assert_framelist_equal(list1, list2, *args, **kwargs): @td.skip_if_no("bs4") +@td.skip_if_no("html5lib") def test_bs4_version_fails(monkeypatch, datapath): import bs4 @@ -85,6 +86,7 @@ def test_invalid_flavor(): @td.skip_if_no("bs4") @td.skip_if_no("lxml") +@td.skip_if_no("html5lib") def test_same_ordering(datapath): filename = datapath("io", "data", "html", "valid_markup.html") dfs_lxml = read_html(filename, index_col=0, flavor=["lxml"]) @@ -95,7 +97,7 @@ def test_same_ordering(datapath): @pytest.mark.parametrize( "flavor", [ - pytest.param("bs4", marks=td.skip_if_no("bs4")), + pytest.param("bs4", marks=[td.skip_if_no("bs4"), td.skip_if_no("html5lib")]), pytest.param("lxml", marks=td.skip_if_no("lxml")), ], scope="class",