From e6afcac23a6a370a834efebab1a4b630c5d3f8c9 Mon Sep 17 00:00:00 2001 From: Kevin Hunter Kesling Date: Tue, 12 Nov 2024 23:23:19 -0500 Subject: [PATCH] Remove test detritus (#1716) Was manually creating a hard-coded path in `/tmp/`. No good. Update to use `tmp_path` fixture. --- compute_endpoint/tests/unit/test_htex.py | 9 ++------- 1 file changed, 2 insertions(+), 7 deletions(-) diff --git a/compute_endpoint/tests/unit/test_htex.py b/compute_endpoint/tests/unit/test_htex.py index a2a83a567..4b8a68bc9 100644 --- a/compute_endpoint/tests/unit/test_htex.py +++ b/compute_endpoint/tests/unit/test_htex.py @@ -1,4 +1,3 @@ -import os import queue import threading import typing as t @@ -18,7 +17,7 @@ @pytest.fixture -def htex(): +def htex(tmp_path): ep_id = uuid.uuid4() executor = HighThroughputEngine( address="127.0.0.1", @@ -27,14 +26,10 @@ def htex(): worker_debug=True, ) q = queue.Queue() - tempdir = "/tmp/HTEX_logs" - - os.makedirs(tempdir, exist_ok=True) - executor.start(endpoint_id=ep_id, run_dir=tempdir, results_passthrough=q) + executor.start(endpoint_id=ep_id, run_dir=str(tmp_path), results_passthrough=q) yield executor executor.shutdown() - # shutil.rmtree(tempdir, ignore_errors=True) def test_engine_submit_container_location(