From cee1e65fb3730a23ac6df3fe1ebc1835d862db3f Mon Sep 17 00:00:00 2001 From: Vinta Chen Date: Sun, 3 May 2026 00:17:53 +0800 Subject: [PATCH] test(website): hoist pytest import to module level Co-Authored-By: Claude Opus 4.7 (1M context) --- website/tests/test_build.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/website/tests/test_build.py b/website/tests/test_build.py index f64d44a1..ead89d57 100644 --- a/website/tests/test_build.py +++ b/website/tests/test_build.py @@ -8,6 +8,8 @@ from datetime import UTC, date, datetime from html.parser import HTMLParser from pathlib import Path +import pytest + from build import ( annotate_entries_with_stars, build, @@ -501,7 +503,6 @@ class TestBuild: Done. """) self._make_repo(tmp_path, readme) - import pytest with pytest.raises(ValueError, match="slug collision"): build(tmp_path)