diff --git a/tests/flojoy_node_venv_test_.py b/tests/flojoy_node_venv_test_.py index c727cb0..dbe5534 100644 --- a/tests/flojoy_node_venv_test_.py +++ b/tests/flojoy_node_venv_test_.py @@ -128,25 +128,21 @@ def empty_function_with_error(): @pytest.mark.parametrize("daemon", [True, False]) def test_run_in_venv_runs_within_thread(mock_venv_cache_dir, daemon): - from threading import Thread from queue import Queue def function_to_run_within_thread(queue): - from flojoy import run_in_venv - @run_in_venv( - pip_dependencies=["numpy==1.23.0"] - ) + @run_in_venv(pip_dependencies=["numpy==1.23.0"]) def func_with_venv(): import numpy as np return 42 - + # Run the function queue.put(func_with_venv()) - + # Run the function in a thread queue = Queue() thread = Thread(target=function_to_run_within_thread, args=(queue,), daemon=daemon) @@ -158,4 +154,3 @@ def func_with_venv(): assert not queue.empty() # Check that the function has returned assert queue.get(timeout=60) == 42 -