diff --git a/CHANGES.md b/CHANGES.md index 9ecfcd0..b0a5fef 100644 --- a/CHANGES.md +++ b/CHANGES.md @@ -8,6 +8,7 @@ releases are available on [PyPI](https://pypi.org/project/pytask-parallel) and ## 0.3.1 - 2023-xx-xx - {pull}`56` refactors the `ProcessPoolExecutor`. +- {pull}`57` does some housekeeping. ## 0.3.0 - 2023-01-23 diff --git a/pyproject.toml b/pyproject.toml index 0819456..24f0479 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -65,3 +65,15 @@ extend-ignore = [ [tool.ruff.pydocstyle] convention = "numpy" + + +[tool.pytest.ini_options] +# Do not add src since it messes with the loading of pytask-parallel as a plugin. +testpaths = ["test"] +markers = [ + "wip: Tests that are work-in-progress.", + "unit: Flag for unit tests which target mainly a single function.", + "integration: Flag for integration tests which may comprise of multiple unit tests.", + "end_to_end: Flag for tests that cover the whole program.", +] +norecursedirs = [".idea", ".tox"] diff --git a/src/pytask_parallel/execute.py b/src/pytask_parallel/execute.py index 8f72785..f3178a0 100644 --- a/src/pytask_parallel/execute.py +++ b/src/pytask_parallel/execute.py @@ -154,14 +154,10 @@ def pytask_execute_build(session: Session) -> bool | None: # noqa: C901, PLR091 def _parse_future_exception( - exception: BaseException | None, + exc: BaseException | None, ) -> tuple[type[BaseException], BaseException, TracebackType] | None: - """Parse a future exception.""" - return ( - None - if exception is None - else (type(exception), exception, exception.__traceback__) - ) + """Parse a future exception into the format of ``sys.exc_info``.""" + return None if exc is None else (type(exc), exc, exc.__traceback__) class ProcessesNameSpace: diff --git a/tox.ini b/tox.ini index 8ac41cc..e83a36d 100644 --- a/tox.ini +++ b/tox.ini @@ -18,34 +18,3 @@ conda_channels = commands = pip install --no-deps -e . pytest {posargs} - -[flake8] -docstring-convention = numpy -ignore = - D - E203 ; ignores whitespace around : which is enforced by Black. - W503 ; ignores linebreak before binary operator which is enforced by Black. - PT006 ; ignores that parametrizing tests with tuple argument names is preferred. -max-line-length = 88 -pytest-mark-no-parentheses = true -warn-symbols = - pytest.mark.wip = Remove 'wip' mark for tests. - pytest.mark.skip = Remove 'skip' flag for tests. - -[pytest] -testpaths = - # Do not add src since it messes with the loading of pytask-parallel as a plugin. - tests -addopts = --doctest-modules -filterwarnings = - ignore: the imp module is deprecated in favour of importlib - ignore: The (symbol|parser) module is deprecated and will be removed in future - ignore: Using or importing the ABCs from 'collections' instead of from -markers = - wip: Tests that are work-in-progress. - unit: Flag for unit tests which target mainly a single function. - integration: Flag for integration tests which may comprise of multiple unit tests. - end_to_end: Flag for tests that cover the whole program. -norecursedirs = - .idea - .tox