Skip to content

Commit c3e4a23

Browse files
authored
shorter unix socket path for mac (#3096)
2 parents 1290b69 + 0ef98a3 commit c3e4a23

1 file changed

Lines changed: 5 additions & 1 deletion

File tree

tests/test_serving.py

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -54,9 +54,13 @@
5454
)
5555
@pytest.mark.dev_server
5656
def test_server(
57-
tmp_path: Path, dev_server: StartDevServer, kwargs: dict[str, t.Any]
57+
tmp_path_factory: pytest.TempPathFactory,
58+
dev_server: StartDevServer,
59+
kwargs: dict[str, t.Any],
5860
) -> None:
5961
if kwargs.get("hostname") == "unix":
62+
# Pytest's tmp_path is too long on macOS, use a shorter name.
63+
tmp_path = tmp_path_factory.mktemp("sock")
6064
kwargs["hostname"] = f"unix://{tmp_path / 'test.sock'}"
6165

6266
client = dev_server(**kwargs)

0 commit comments

Comments
 (0)