diff --git a/tests/test_elements.py b/tests/test_elements.py index c0e1e934..03639ee1 100644 --- a/tests/test_elements.py +++ b/tests/test_elements.py @@ -7,7 +7,12 @@ @pytest.mark.parametrize( "html_file, expected_tag_to_xpath, expected_page_text, expected_tag_string", [ - ("mock_html/text_only.html", {0: "//html/body/h1/text()"}, ["Hello, World!"], ["[ 0 ]"]), + ( + "mock_html/text_only.html", + {0: "//html/body/h1/text()"}, + ["Hello, World!"], + ["[ 0 ]"], + ), ( "mock_html/hyperlink_only.html", {0: '//html/body/p/a[@id="link1"]'}, diff --git a/tests/test_namespace.py b/tests/test_namespace.py index 56e78aed..8ec25a28 100644 --- a/tests/test_namespace.py +++ b/tests/test_namespace.py @@ -66,7 +66,6 @@ async def test_xpath_namespace(tarsier, async_page): _, tag_to_xpath = await tarsier.page_to_text(async_page, tag_text_elements=True) assert len(tag_to_xpath) == 1, "The page contains only a single tag" - assert tag_to_xpath[0] == '//html/body/*[name()="sc:visitoridentification"]/div/text()', ( - f"Namespaces within the xpath were not correctly handled " - f"Got: {tag_to_xpath}" - ) + assert ( + tag_to_xpath[0] == '//html/body/*[name()="sc:visitoridentification"]/div/text()' + ), f"Namespaces within the xpath were not correctly handled " f"Got: {tag_to_xpath}"