Skip to content

Commit 1715c7a

Browse files
committed
➖ Remove pytest-forked
Problem: - pytest-forked (https://pypi.org/project/pytest-forked/) is basically orphaned and unmaintained. Instead, pytest-xdist (https://pypi.org/project/pytest-xdist/) provides the ability to spread tests across CPUs. Solution: - Replace pytest-forked with pytest-xdist
1 parent 02b28c1 commit 1715c7a

File tree

2 files changed

+3
-4
lines changed

2 files changed

+3
-4
lines changed

.github/workflows/test.yml

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -56,8 +56,7 @@ jobs:
5656
- name: Install python quality tools
5757
run: |
5858
pipx install pytest
59-
pipx inject pytest pytest-forked
60-
pipx inject pytest hypothesis
59+
pipx inject pytest pytest-xdist hypothesis
6160
pipx install mypy
6261
pipx install black
6362
echo "/opt/pipx_bin" >> $GITHUB_PATH

cmake/test.cmake

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -245,8 +245,8 @@ function(add_python_test_target name)
245245
set(include_dirs_arg --include_dirs ${include_dirs})
246246
endif()
247247
set(target_test_command
248-
env "PYTHONPYCACHEPREFIX=${CMAKE_BINARY_DIR}/__pycache__" pytest
249-
--forked -o "cache_dir=${CMAKE_BINARY_DIR}/.pytest_cache"
248+
env "PYTHONPYCACHEPREFIX=${CMAKE_BINARY_DIR}/__pycache__" pytest -n
249+
auto -o "cache_dir=${CMAKE_BINARY_DIR}/.pytest_cache"
250250
--rootdir=${CMAKE_SOURCE_DIR} -s ${UNIT_FILES} ${include_files_arg}
251251
${include_dirs_arg} ${UNIT_EXTRA_ARGS})
252252

0 commit comments

Comments
 (0)