From fa4a818c2a76c65e01e5161e3ec94d7427791d4b Mon Sep 17 00:00:00 2001 From: Seyon Sivarajah Date: Thu, 29 Aug 2024 13:38:19 +0100 Subject: [PATCH] use dot pipe rather than tempfile --- hugr-py/tests/conftest.py | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) diff --git a/hugr-py/tests/conftest.py b/hugr-py/tests/conftest.py index b6b7bfb21c..914546dce7 100644 --- a/hugr-py/tests/conftest.py +++ b/hugr-py/tests/conftest.py @@ -6,7 +6,6 @@ import subprocess from dataclasses import dataclass from enum import Enum -from tempfile import NamedTemporaryFile from typing import TYPE_CHECKING, TypeVar from typing_extensions import Self @@ -166,9 +165,7 @@ def validate( dot = h.render_dot() assert snap == dot.source if os.environ.get("HUGR_RENDER_DOT"): - with NamedTemporaryFile(mode="w", delete=True) as f: - # test rendering succeeds - dot.render(f.name) + dot.pipe("svg") def _run_hugr_cmd(serial: str, cmd: list[str]):