2026-05-12 21:34:14 -07:00
|
|
|
import subprocess
|
|
|
|
|
import sys
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
def test_version_subcommand():
|
|
|
|
|
r = subprocess.run(
|
2026-05-15 20:02:00 -07:00
|
|
|
[sys.executable, "-m", "invisible_playwright", "version"],
|
2026-05-12 21:34:14 -07:00
|
|
|
capture_output=True, text=True, check=True,
|
|
|
|
|
)
|
|
|
|
|
assert "firefox-" in r.stdout
|
2026-05-15 20:02:00 -07:00
|
|
|
assert "invisible_playwright" in r.stdout.lower()
|
2026-05-12 21:34:14 -07:00
|
|
|
|
|
|
|
|
|
|
|
|
|
def test_help_subcommand():
|
|
|
|
|
r = subprocess.run(
|
2026-05-15 20:02:00 -07:00
|
|
|
[sys.executable, "-m", "invisible_playwright", "--help"],
|
2026-05-12 21:34:14 -07:00
|
|
|
capture_output=True, text=True,
|
|
|
|
|
)
|
|
|
|
|
assert r.returncode == 0
|
|
|
|
|
assert "fetch" in r.stdout
|
|
|
|
|
assert "path" in r.stdout
|
|
|
|
|
assert "clear-cache" in r.stdout
|