From dc44e7fcab0ece812cf55e531158876d845022a2 Mon Sep 17 00:00:00 2001 From: Eli Schwartz Date: Sun, 31 Dec 2023 16:04:47 -0500 Subject: [PATCH] migrate from external mock package to stdlib unittest.mock (#1673) It was moved to the stdlib in python 3.3, and the PyPI version is a backport for python versions less than 3.3. --- CHANGES.rst | 1 + tests/cascade_dependencies_test.py | 2 +- tests/commands_test.py | 2 +- tests/requirements.txt | 1 - tox.ini | 1 - 5 files changed, 3 insertions(+), 4 deletions(-) delete mode 100644 tests/requirements.txt diff --git a/CHANGES.rst b/CHANGES.rst index 8afb72189..28e3fe5e2 100644 --- a/CHANGES.rst +++ b/CHANGES.rst @@ -42,6 +42,7 @@ fixes: - docs: add readthedocs yaml config (#1661) - fix: broken integration tests (#1668) - style: replace format() with f-strings (#1667) +- migrate from external mock package to stdlib unittest.mock (#1673) v6.1.9 (2022-06-11) diff --git a/tests/cascade_dependencies_test.py b/tests/cascade_dependencies_test.py index 357df721c..bbe920cd9 100644 --- a/tests/cascade_dependencies_test.py +++ b/tests/cascade_dependencies_test.py @@ -1,7 +1,7 @@ import os import pathlib -import mock +from unittest import mock import pytest extra_plugin_dir = os.path.join( diff --git a/tests/commands_test.py b/tests/commands_test.py index 8d33df577..5eaaa8dd1 100644 --- a/tests/commands_test.py +++ b/tests/commands_test.py @@ -9,7 +9,7 @@ from tempfile import mkdtemp import pytest -from mock import MagicMock +from unittest.mock import MagicMock extra_plugin_dir = path.join(path.dirname(path.realpath(__file__)), "dummy_plugin") diff --git a/tests/requirements.txt b/tests/requirements.txt deleted file mode 100644 index 932a8957f..000000000 --- a/tests/requirements.txt +++ /dev/null @@ -1 +0,0 @@ -mock diff --git a/tox.ini b/tox.ini index 17efb4066..9a4841e59 100644 --- a/tox.ini +++ b/tox.ini @@ -4,7 +4,6 @@ skip_missing_interpreters = True [testenv] deps = - mock pytest slackclient>=1.0.5,<2.0