invisible_playwright/tests
feder-cr 66c6b09821 fix: __version__ comes from package metadata; add --version flag (#24)
Two bugs reported in #24:

1. `python -m invisible_playwright version` printed the literal "0.1.0"
   regardless of the installed version. Root cause: __version__ in
   __init__.py was hardcoded and never bumped when the package version
   moved past 0.1.0. Fix: read from importlib.metadata so __version__
   stays in lockstep with pyproject.toml's `version` field by construction.

2. `python -m invisible_playwright --version` errored with "the
   following arguments are required: cmd". Root cause: the parser had
   `required=True` on its subparsers and no top-level --version flag.
   Fix: add a top-level `--version`/`-V` flag using argparse's standard
   version action, drop `required=True`, and reroute the "no subcommand"
   case through parser.error() so the existing test_no_subcommand_errors
   contract is preserved.

7 new unit tests pin both behaviours so they can't regress silently.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
2026-05-27 00:18:03 -07:00
..
conftest.py test: add pytest markers, conftest, fix Windows-incompatible existing tests 2026-05-14 11:21:10 +02:00
test_async_api.py test(launcher, headless, async_api): add 32 Phase 10 gap-coverage tests 2026-05-14 12:59:47 +02:00
test_build.py tests: add wheel regression — fail if wheel has duplicate zip entries 2026-05-16 10:39:40 -07:00
test_cli.py tests: add/update tests/test_cli.py 2026-05-15 20:02:00 -07:00
test_constants.py test: fortress coverage for download + constants + e2e 2026-05-20 12:20:11 -07:00
test_cross_origin_iframe.py release: 0.1.8 - fix #20 cross-origin iframe regression (pref-only) 2026-05-23 10:05:02 -07:00
test_download.py test: fortress coverage for download + constants + e2e 2026-05-20 12:20:11 -07:00
test_e2e.py test(e2e): add 4 Linux launcher-routing tests for Phase 9 2026-05-14 14:07:03 +02:00
test_fingerprint_consistency.py feat: deterministic reCAPTCHA cookie pre-seed via Bayesian browsing history 2026-05-24 20:01:26 -07:00
test_fingerprint_surface.py test: fingerprint surface + consistency e2e tests 2026-05-21 13:47:14 -07:00
test_fpforge.py tests: add/update tests/test_fpforge.py 2026-05-15 20:01:55 -07:00
test_headless.py test(prefs, headless): add 16 Linux-specific tests for Phase 6 + 10 2026-05-14 13:21:17 +02:00
test_imports.py tests: add/update tests/test_imports.py 2026-05-15 20:01:53 -07:00
test_integration.py test(integration): add 3 Linux pipeline tests for Phase 8 2026-05-14 13:53:24 +02:00
test_launcher_config.py feat: persistent profile dir + C7 closure (firefox-5 / 0.1.6) 2026-05-21 12:19:38 -07:00
test_launcher_helpers.py test(launcher, headless, async_api): add 32 Phase 10 gap-coverage tests 2026-05-14 12:59:47 +02:00
test_mouse.py fix: every mouse action failed on FF150 — jugglerSendMouseEvent was never landed (#9) 2026-05-18 14:45:01 -07:00
test_network.py test(network): add 25 unit tests for Bayesian network primitives 2026-05-14 11:24:57 +02:00
test_pin.py tests: add/update tests/test_pin.py 2026-05-15 20:01:56 -07:00
test_prefs.py Merge pull request #2 from christianbaumann/main 2026-05-16 17:14:08 -07:00
test_profile.py test(profile): add 43 unit tests for Profile dataclass and pin system 2026-05-14 11:46:09 +02:00
test_proxy.py tests: add/update tests/test_proxy.py 2026-05-15 20:01:54 -07:00
test_recaptcha_seed.py feat: deterministic reCAPTCHA cookie pre-seed via Bayesian browsing history 2026-05-24 20:01:26 -07:00
test_release_e2e.py test: fortress coverage for download + constants + e2e 2026-05-20 12:20:11 -07:00
test_sampler.py test(sampler): add 55 unit tests for fingerprint Bayesian sampler 2026-05-14 11:35:24 +02:00
test_service_worker.py test: unblock pre-push hook collection 2026-05-21 20:21:12 -07:00
test_version.py fix: __version__ comes from package metadata; add --version flag (#24) 2026-05-27 00:18:03 -07:00