ci: register browser pytest marker to silence PytestUnknownMarkWarning #40

Closed
opened 2026-04-15 20:24:51 -07:00 by pyr0ball · 0 comments
Owner

Context

The GitHub Actions CI workflow runs pytest with -m "not browser" to skip any future headed-Chromium tests (Kasada bypass, scraper integration) that cannot run without a display or playwright browser install.

No tests currently use this mark, but pytest emits PytestUnknownMarkWarning when filtering on an unregistered marker.

Fix

Register the marker in pyproject.toml:

[tool.pytest.ini_options]
testpaths = ["tests"]
markers = [
    "browser: tests that require a headed Chromium browser (Xvfb + playwright install required)",
]

When browser-dependent tests are added in the future, decorate them with @pytest.mark.browser so they are excluded from CI automatically.

Notes

  • This is a warning, not a failure — CI passes as-is
  • No existing tests need to be re-marked; they are all pure unit/mock tests
  • The marker is also useful as documentation: any test marked browser signals it needs a display environment
## Context The GitHub Actions CI workflow runs pytest with `-m "not browser"` to skip any future headed-Chromium tests (Kasada bypass, scraper integration) that cannot run without a display or playwright browser install. No tests currently use this mark, but pytest emits `PytestUnknownMarkWarning` when filtering on an unregistered marker. ## Fix Register the marker in `pyproject.toml`: ```toml [tool.pytest.ini_options] testpaths = ["tests"] markers = [ "browser: tests that require a headed Chromium browser (Xvfb + playwright install required)", ] ``` When browser-dependent tests are added in the future, decorate them with `@pytest.mark.browser` so they are excluded from CI automatically. ## Notes - This is a warning, not a failure — CI passes as-is - No existing tests need to be re-marked; they are all pure unit/mock tests - The marker is also useful as documentation: any test marked `browser` signals it needs a display environment
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference: Circuit-Forge/snipe#40
No description provided.