Skip to content

Commit e986b02

Browse files
authored
removes playwright to test against output (#860)
* removes playwright to test against output * reformate * apply changes
1 parent c7b89a2 commit e986b02

File tree

6 files changed

+135
-502
lines changed

6 files changed

+135
-502
lines changed

.github/workflows/playwright.yml

Lines changed: 7 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,4 @@
1-
name: Playwright Tests
2-
# https://devblogs.microsoft.com/python/announcing-playwright-for-python-reliable-end-to-end-testing-for-the-web/
3-
# https://github.com/marketplace/actions/run-playwright-tests
1+
name: Site Tests
42

53
on:
64
push:
@@ -11,9 +9,11 @@ on:
119
- gh-pages
1210
workflow_dispatch:
1311

12+
permissions:
13+
contents: read
14+
1415
jobs:
1516
test:
16-
timeout-minutes: 30
1717
runs-on: ubuntu-latest
1818
steps:
1919
- uses: actions/checkout@v4
@@ -22,11 +22,8 @@ jobs:
2222
with:
2323
version: "latest"
2424
- name: Set up Python
25-
run: uv python install 3.12
25+
run: uv python install 3.14
2626
- name: Install dependencies
27-
run: |
28-
uv sync --extra dev
29-
uv run playwright install --with-deps chromium
27+
run: uv sync --dev prerelease allow
3028
- name: Run Tests
31-
run: |
32-
uv run python -m pytest tests/test.py::test_destination -v || echo "Some tests failed but continuing..."
29+
run: uv run pytest -v

pyproject.toml

Lines changed: 5 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -3,19 +3,18 @@ name = "blackpythondevs-site"
33
version = "0.1.0"
44
description = "Black Python Devs community website"
55
requires-python = ">=3.13"
6-
dependencies = ["render-engine[cli]>=2026.3.4a2", "pyyaml"]
6+
dependencies = [
7+
"render-engine[cli]>=2026.3.4a2",
8+
"pyyaml",
9+
]
710

811
[project.optional-dependencies]
912
dev = [
1013
"pre-commit",
1114
"typer",
1215
"rich",
1316
"python-frontmatter",
14-
"ephemeral_port_reserve",
15-
"pytest-playwright",
16-
"pytest-xprocess",
17-
"axe-core-python==0.1.0",
18-
"axe-playwright-python==0.1.7",
17+
"pytest",
1918
]
2019

2120
[tool.render-engine.cli]

tests/conftest.py

Lines changed: 0 additions & 24 deletions
Original file line numberDiff line numberDiff line change
@@ -1,15 +1,4 @@
11
import pytest
2-
import ephemeral_port_reserve
3-
4-
5-
@pytest.fixture(scope="module")
6-
def url_port() -> tuple[str, int]:
7-
"""returns the localhost and port"""
8-
hostname = ephemeral_port_reserve.LOCALHOST
9-
free_port = ephemeral_port_reserve.reserve(hostname)
10-
url = f"http://{hostname}:{free_port}"
11-
return url, free_port
12-
132

143
ROUTES = [
154
"",
@@ -23,16 +12,3 @@ def url_port() -> tuple[str, int]:
2312
@pytest.fixture(params=ROUTES)
2413
def loaded_route(request):
2514
return request.param
26-
27-
28-
PROFILES = [
29-
"iPhone 15",
30-
"iPhone 15 landscape",
31-
"iPhone 15 Plus",
32-
"iPhone 15 Plus landscape",
33-
]
34-
35-
36-
@pytest.fixture(scope="session", params=PROFILES)
37-
def loaded_profile(request):
38-
return request.param

0 commit comments

Comments
 (0)