test(website): hoist pytest import to module level

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
This commit is contained in:
Vinta Chen
2026-05-03 00:17:53 +08:00
parent 583d5e7c51
commit cee1e65fb3

View File

@@ -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)