Skip to content
This repository has been archived by the owner on Oct 10, 2023. It is now read-only.

Commit

Permalink
run black formatter
Browse files Browse the repository at this point in the history
  • Loading branch information
Roulbac committed Aug 2, 2023
1 parent 76af006 commit 2cdea65
Showing 1 changed file with 3 additions and 8 deletions.
11 changes: 3 additions & 8 deletions tests/flojoy_node_venv_test_.py
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand All @@ -158,4 +154,3 @@ def func_with_venv():
assert not queue.empty()
# Check that the function has returned
assert queue.get(timeout=60) == 42

0 comments on commit 2cdea65

Please sign in to comment.