mirror of
https://github.com/feder-cr/invisible_playwright.git
synced 2026-06-10 08:45:13 +02:00
The 138 @pytest.mark.e2e tests were doubly inactive: deselected by addopts AND skipped without a cached binary — and 3 of the 6 per-file firefox_binary fixtures silently ignored INVPW_BINARY_PATH, so they'd test whatever was cached even when you pointed the suite elsewhere (a false-confidence trap). - Centralize firefox_binary into conftest.py (env INVPW_BINARY_PATH → cache → skip); delete the 6 duplicates. Unify test_webrtc_realness onto the same env. - scripts/run_e2e.py: one command that runs ALL e2e against a chosen binary, with reruns so an under-load interaction flake (dblclick/hover pass 3/3 in isolation) self-heals while a real break fails every attempt. The webrtc e2e fake a TCP-only SOCKS locally, so the suite is offline. This is the MANDATORY pre-release browser gate (local — hosted runners are too interaction-flaky). - Running the suite against firefox-9 surfaced a real gap: `invisible_playwright fetch --force` was unrecognized (the subparser took no args) though the e2e test + docstring expect it. Implement it: drop the cached version dir, refetch. - Add pytest-rerunfailures + playwright to the dev extras. Baseline against firefox-9: 136 passed, 1 skipped (linux_only on win host), 1 was the --force gap now fixed.
62 lines
2.2 KiB
TOML
62 lines
2.2 KiB
TOML
[build-system]
|
|
requires = ["hatchling"]
|
|
build-backend = "hatchling.build"
|
|
|
|
[project]
|
|
name = "invisible-playwright"
|
|
version = "0.2.0"
|
|
description = "Playwright wrapper for a patched Firefox with deterministic stealth profile."
|
|
readme = "README.md"
|
|
requires-python = ">=3.11"
|
|
license = "MIT"
|
|
authors = [{ name = "feder-cr", email = "85809106+feder-cr@users.noreply.github.com" }]
|
|
keywords = ["playwright", "firefox", "stealth", "anti-detect", "automation"]
|
|
classifiers = [
|
|
"Development Status :: 4 - Beta",
|
|
"Intended Audience :: Developers",
|
|
"License :: OSI Approved :: MIT License",
|
|
"Programming Language :: Python :: 3",
|
|
"Programming Language :: Python :: 3.11",
|
|
"Programming Language :: Python :: 3.12",
|
|
]
|
|
dependencies = [
|
|
"playwright>=1.40",
|
|
"platformdirs>=4",
|
|
"requests[socks]>=2.31",
|
|
"maxminddb>=2.2",
|
|
"tzdata>=2024.1",
|
|
"tqdm>=4.66",
|
|
"pywin32>=306; sys_platform == 'win32'",
|
|
]
|
|
|
|
[project.optional-dependencies]
|
|
dev = ["pytest>=7", "pytest-mock>=3", "responses>=0.24", "build>=1", "pytest-rerunfailures>=14", "playwright>=1.40"]
|
|
|
|
[tool.pytest.ini_options]
|
|
markers = [
|
|
"unit: pure-logic tests, no I/O or external deps",
|
|
"integration: multi-module tests, no browser",
|
|
"e2e: requires patched Firefox binary and display",
|
|
"slow: tests that build the wheel — opt-in only",
|
|
"linux_only: tests that require Linux platform",
|
|
]
|
|
addopts = "-m 'not slow and not e2e'"
|
|
# tests/playwright-upstream/ is a vendored Microsoft Playwright test suite
|
|
# used for compatibility verification on demand. It has its own deps
|
|
# (pixelmatch with API not matching our version) and a conftest that fails
|
|
# collection in our env. Run it explicitly with --override-ini for compat
|
|
# audits, not on every push.
|
|
norecursedirs = ["playwright-upstream"]
|
|
|
|
[project.scripts]
|
|
invisible-playwright = "invisible_playwright.cli:main"
|
|
|
|
[project.urls]
|
|
Homepage = "https://github.com/feder-cr/invisible_playwright"
|
|
Issues = "https://github.com/feder-cr/invisible_playwright/issues"
|
|
|
|
[tool.hatch.build.targets.wheel]
|
|
packages = ["src/invisible_playwright"]
|
|
|
|
[tool.hatch.build.targets.sdist]
|
|
include = ["src/invisible_playwright", "tests", "README.md", "LICENSE", "pyproject.toml"]
|