Skip to content

Commit 99ec471

Browse files
committed
cleaner error handling
1 parent 23b711b commit 99ec471

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

tests/test_playwright.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@
88
try:
99
from pathlib import UnsupportedOperation # added in Py 3.13
1010
except ImportError:
11-
UnsupportedOperation = None
11+
UnsupportedOperation = NotImplementedError
1212

1313
# Using importorskip to ensure these tests are only loaded if Playwright is installed.
1414
playwright = pytest.importorskip("playwright")
@@ -45,8 +45,8 @@ def test_colors(sphinx_build_factory, page: Page, url_base: str) -> None:
4545
try:
4646
symlink_path.symlink_to(sphinx_build.outdir, True)
4747
page.goto(urljoin(url_base, "playwright_tests/colors/index.html"))
48-
except (NotImplementedError, UnsupportedOperation):
49-
print("filesystem doesn't support symlinking")
48+
except UnsupportedOperation:
49+
pytest.xfail("filesystem doesn't support symlinking")
5050
else:
5151
# check the colors
5252
primary_color = "rgb(10, 125, 145)"

0 commit comments

Comments
 (0)