Skip to content

Commit d73f6ce

Browse files
committed
Change testing strategy for hangers.
1 parent be08b7a commit d73f6ce

File tree

5 files changed

+18
-35
lines changed

5 files changed

+18
-35
lines changed

src/py/pyproject.toml

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -54,7 +54,6 @@ dev = [
5454
"pandas>=2.0.3",
5555
"typing-extensions>=4.12.2",
5656
"hypothesis>=6.113.0",
57-
"pytest-forked>=1.6.0",
5857
"pyright>=1.1.406",
5958
]
6059

src/py/tests/test_init.py

Lines changed: 7 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,8 @@
11
"""Tests for wrapper functions in __init__.py that test argument passing."""
22

3+
import subprocess
4+
import sys
5+
from pathlib import Path
36
from typing import TYPE_CHECKING
47
from unittest.mock import AsyncMock, patch
58

@@ -31,15 +34,10 @@ def kwargs():
3134
_ = kaleido._sync_server.GlobalKaleidoServer.open # noqa: SLF001
3235

3336

34-
@pytest.mark.forked
35-
def test_closing_no_close():
36-
kaleido.start_sync_server()
37-
38-
39-
@pytest.mark.forked
40-
def test_open_close():
41-
kaleido.start_sync_server()
42-
kaleido.stop_sync_server()
37+
def test_hangers():
38+
folder = Path(__file__).parent / "win_hang_scripts"
39+
subprocess.run([sys.executable, str(folder / "open_close.py")], check=True) # noqa: S603
40+
subprocess.run([sys.executable, str(folder / "open.py")], check=True) # noqa: S603
4341

4442

4543
@patch("kaleido._sync_server.GlobalKaleidoServer.open")
Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
import kaleido
2+
3+
4+
def test_closing_no_close():
5+
kaleido.start_sync_server()
Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
import kaleido
2+
3+
4+
def test_open_close():
5+
kaleido.start_sync_server()
6+
kaleido.stop_sync_server()

src/py/uv.lock

Lines changed: 0 additions & 25 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

0 commit comments

Comments
 (0)