Try fixing test

This commit is contained in:
Andras Schmelczer 2022-07-03 14:56:01 +02:00
parent d2c0acc900
commit ad1b2a20ef
3 changed files with 10 additions and 9 deletions

View file

@ -28,7 +28,7 @@ jobs:
- name: Install dependencies
run: |
python3 -m pip install --upgrade pip setuptools pytest pytest-cov pytest-subtests pytest-asyncio
pip install .
pip install --upgrade .
- name: Check code and formatting
run: scripts/check-python.sh .
@ -56,7 +56,7 @@ jobs:
- name: Install dependencies
run: |
python -m pip install --upgrade pip
pip install .
pip install --upgrade .
rm -rf build
- name: Download test results

View file

@ -100,6 +100,7 @@ def parallel_map(
ctx.Process(
name=f"parallel_map_{config.function_name}_{i}",
target=mapper_function,
daemon=True,
kwargs=dict(
input_queue=input_queue,
output_queue=output_queue,

View file

@ -87,15 +87,15 @@ class TestParallelMap(unittest.TestCase):
)
) == [1, 4, 9]
# def test_worker_process_exception(self) -> None:
# def oh_no(_):
# raise ValueError("hi")
def test_worker_process_exception(self) -> None:
def oh_no(_):
raise ValueError("hi")
# with pytest.raises(ValueError):
# list(parallel_map(oh_no, range(COUNT), concurrency=2))
with pytest.raises(ValueError):
list(parallel_map(oh_no, range(COUNT), concurrency=2))
# with pytest.raises(ValueError):
# list(parallel_map(oh_no, range(COUNT), concurrency=1))
with pytest.raises(ValueError):
list(parallel_map(oh_no, range(COUNT), concurrency=1))
def test_ignore_worker_process_exception(self) -> None:
def oh_no(_):