Try fixing test
This commit is contained in:
parent
d2c0acc900
commit
ad1b2a20ef
3 changed files with 10 additions and 9 deletions
4
.github/workflows/test.yml
vendored
4
.github/workflows/test.yml
vendored
|
|
@ -28,7 +28,7 @@ jobs:
|
||||||
- name: Install dependencies
|
- name: Install dependencies
|
||||||
run: |
|
run: |
|
||||||
python3 -m pip install --upgrade pip setuptools pytest pytest-cov pytest-subtests pytest-asyncio
|
python3 -m pip install --upgrade pip setuptools pytest pytest-cov pytest-subtests pytest-asyncio
|
||||||
pip install .
|
pip install --upgrade .
|
||||||
|
|
||||||
- name: Check code and formatting
|
- name: Check code and formatting
|
||||||
run: scripts/check-python.sh .
|
run: scripts/check-python.sh .
|
||||||
|
|
@ -56,7 +56,7 @@ jobs:
|
||||||
- name: Install dependencies
|
- name: Install dependencies
|
||||||
run: |
|
run: |
|
||||||
python -m pip install --upgrade pip
|
python -m pip install --upgrade pip
|
||||||
pip install .
|
pip install --upgrade .
|
||||||
rm -rf build
|
rm -rf build
|
||||||
|
|
||||||
- name: Download test results
|
- name: Download test results
|
||||||
|
|
|
||||||
|
|
@ -100,6 +100,7 @@ def parallel_map(
|
||||||
ctx.Process(
|
ctx.Process(
|
||||||
name=f"parallel_map_{config.function_name}_{i}",
|
name=f"parallel_map_{config.function_name}_{i}",
|
||||||
target=mapper_function,
|
target=mapper_function,
|
||||||
|
daemon=True,
|
||||||
kwargs=dict(
|
kwargs=dict(
|
||||||
input_queue=input_queue,
|
input_queue=input_queue,
|
||||||
output_queue=output_queue,
|
output_queue=output_queue,
|
||||||
|
|
|
||||||
|
|
@ -87,15 +87,15 @@ class TestParallelMap(unittest.TestCase):
|
||||||
)
|
)
|
||||||
) == [1, 4, 9]
|
) == [1, 4, 9]
|
||||||
|
|
||||||
# def test_worker_process_exception(self) -> None:
|
def test_worker_process_exception(self) -> None:
|
||||||
# def oh_no(_):
|
def oh_no(_):
|
||||||
# raise ValueError("hi")
|
raise ValueError("hi")
|
||||||
|
|
||||||
# with pytest.raises(ValueError):
|
with pytest.raises(ValueError):
|
||||||
# list(parallel_map(oh_no, range(COUNT), concurrency=2))
|
list(parallel_map(oh_no, range(COUNT), concurrency=2))
|
||||||
|
|
||||||
# with pytest.raises(ValueError):
|
with pytest.raises(ValueError):
|
||||||
# list(parallel_map(oh_no, range(COUNT), concurrency=1))
|
list(parallel_map(oh_no, range(COUNT), concurrency=1))
|
||||||
|
|
||||||
def test_ignore_worker_process_exception(self) -> None:
|
def test_ignore_worker_process_exception(self) -> None:
|
||||||
def oh_no(_):
|
def oh_no(_):
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue