From 282a078a0a0e8b98f9c35136749cf67c9a52175a Mon Sep 17 00:00:00 2001 From: Alexandre Detiste Date: Wed, 3 Jul 2024 17:33:51 +0200 Subject: [PATCH] replace old "mock" with newer "unittest.mock" from the standard library --- requirements.txt | 1 - thinc/tests/layers/test_linear.py | 3 ++- thinc/tests/layers/test_with_debug.py | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/requirements.txt b/requirements.txt index 23cdfd916..0c1cae3f2 100644 --- a/requirements.txt +++ b/requirements.txt @@ -18,7 +18,6 @@ hypothesis>=3.27.0,<6.72.2 pytest>=8.2.0 pytest-cov>=2.7.0,<5.0.0 coverage>=5.0.0,<8.0.0 -mock>=2.0.0,<3.0.0 flake8>=3.5.0,<3.6.0 mypy>=1.5.0,<1.6.0; platform_machine != "aarch64" types-mock>=0.1.1 diff --git a/thinc/tests/layers/test_linear.py b/thinc/tests/layers/test_linear.py index 345669d87..2f2e980fb 100644 --- a/thinc/tests/layers/test_linear.py +++ b/thinc/tests/layers/test_linear.py @@ -1,7 +1,8 @@ +from unittest.mock import MagicMock + import numpy import pytest from hypothesis import given, settings -from mock import MagicMock from numpy.testing import assert_allclose from thinc.api import SGD, Dropout, Linear, chain diff --git a/thinc/tests/layers/test_with_debug.py b/thinc/tests/layers/test_with_debug.py index 3f65a3ac3..3e31c71f0 100644 --- a/thinc/tests/layers/test_with_debug.py +++ b/thinc/tests/layers/test_with_debug.py @@ -1,4 +1,4 @@ -from mock import MagicMock +from unittest.mock import MagicMock from thinc.api import Linear, with_debug