Skip to content

Commit d055475

Browse files
committed
fix
1 parent 9a7ebb6 commit d055475

File tree

3 files changed

+6
-18
lines changed

3 files changed

+6
-18
lines changed

install_playwright/__init__.py

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -33,6 +33,4 @@ def install(
3333

3434
proc = subprocess.run(args, env=get_driver_env(), capture_output=True, text=True)
3535

36-
return (
37-
proc.returncode == 0 and "already installed on the system!" not in proc.stdout
38-
)
36+
return proc.returncode == 0

setup.cfg

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -51,3 +51,8 @@ strict = True
5151

5252
[tool:black]
5353
line-length = 88
54+
55+
[tool:pytest]
56+
omit =
57+
tests/*
58+
setup.py

tests/test_install_playwright.py

Lines changed: 0 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -11,35 +11,20 @@ def test_install_sync() -> None:
1111
with sync_playwright() as p:
1212
res = install(p.chromium)
1313
assert res is True
14-
with sync_playwright() as p:
15-
res = install(p.chromium)
16-
assert res is False
17-
1814

1915
def test_install_sync_with_deps() -> None:
2016
with sync_playwright() as p:
2117
res = install(p.chromium, with_deps=True)
2218
assert res is True
23-
with sync_playwright() as p:
24-
res = install(p.chromium, with_deps=True)
25-
assert res is False
26-
2719

2820
@pytest.mark.asyncio
2921
async def test_install_async() -> None:
3022
async with async_playwright() as p:
3123
res = install(p.chromium)
3224
assert res is True
33-
async with async_playwright() as p:
34-
res = install(p.chromium)
35-
assert res is False
36-
3725

3826
@pytest.mark.asyncio
3927
async def test_install_async_with_deps() -> None:
4028
async with async_playwright() as p:
4129
res = install(p.chromium, with_deps=True)
4230
assert res is True
43-
async with async_playwright() as p:
44-
res = install(p.chromium, with_deps=True)
45-
assert res is False

0 commit comments

Comments
 (0)