From 6fe8c4e3bc3d5a8a053115e238f1cc974cd793b5 Mon Sep 17 00:00:00 2001 From: Eli Schwartz Date: Mon, 4 Dec 2023 04:05:52 -0500 Subject: [PATCH] migrate from external mock package to stdlib unittest.mock (#212) The PyPI standalone mock package is a straight backport of the stdlib to older versions of python. It is usually not needed. In this case, the required version of mock is >=4, which backports the python 3.8 stdlib. The minimum version of python required is already 3.8, so all functionality guaranteed to exist is already part of the stdlib. Simply use the stdlib directly. --- setup.cfg | 3 +-- setup.py | 2 +- 2 files changed, 2 insertions(+), 3 deletions(-) diff --git a/setup.cfg b/setup.cfg index 8e2f7c8170..a60c24c793 100644 --- a/setup.cfg +++ b/setup.cfg @@ -12,7 +12,7 @@ testpaths = graphviz tests addopts = - --doctest-modules + --doctest-modules --doctest-glob='*.rst' --ignore=docs/conf.py --doctest-continue-on-failure # pytest summary: all except (E)rror @@ -24,7 +24,6 @@ addopts = --durations=10 --cov --cov-report=term --cov-report=html --strict-config --strict-markers -mock_use_standalone_module = true log_cli = true log_cli_level = WARNING log_file = test-log.txt diff --git a/setup.py b/setup.py index 5951f4a01c..e972b4b604 100644 --- a/setup.py +++ b/setup.py @@ -23,7 +23,7 @@ extras_require={ 'dev': ['tox>=3', 'flake8', 'pep8-naming', 'wheel', 'twine'], 'test': ['pytest>=7', - 'pytest-mock>=3', 'mock>=4', + 'pytest-mock>=3', 'pytest-cov', 'coverage'], 'docs': ['sphinx>=5,<7', 'sphinx-autodoc-typehints', 'sphinx-rtd-theme'], },