Repository: python-lml/lml (language: python)

Issue:
use unittest.mock instead of mock
Could you please consider to use unittest.mock instead of mock, at least optionally?


Discussion / hints:
Surely! An PR would be welcome too.

Fix patch:
diff --git a/.isort.cfg b/.isort.cfg
index 646d29a..c9439da 100644
--- a/.isort.cfg
+++ b/.isort.cfg
@@ -1,7 +1,7 @@
 [settings]
 line_length=79
 known_first_party=
-known_third_party=mock,nose
+known_third_party=nose
 indent='    '
 multi_line_output=3
 length_sort=1


Test patch:
diff --git a/tests/requirements.txt b/tests/requirements.txt
index 05bb89b..f7682d5 100644
--- a/tests/requirements.txt
+++ b/tests/requirements.txt
@@ -1,4 +1,3 @@
-mock
 pytest
 pytest-cov
 codecov
diff --git a/tests/test_plugin_loader.py b/tests/test_plugin_loader.py
index 968b9cb..b75b756 100644
--- a/tests/test_plugin_loader.py
+++ b/tests/test_plugin_loader.py
@@ -1,4 +1,4 @@
-from mock import patch
+from unittest.mock import patch
 
 
 @patch("pkgutil.get_importer")
diff --git a/tests/test_plugin_manager.py b/tests/test_plugin_manager.py
index b82b436..bdf21ce 100644
--- a/tests/test_plugin_manager.py
+++ b/tests/test_plugin_manager.py
@@ -6,7 +6,7 @@
     _show_me_your_name,
 )
 
-from mock import patch
+from unittest.mock import patch
 from pytest import raises
 
 
diff --git a/tests/test_utils.py b/tests/test_utils.py
index e6820c9..ae2bb6c 100644
--- a/tests/test_utils.py
+++ b/tests/test_utils.py
@@ -1,7 +1,7 @@
 from lml.utils import do_import, json_dumps
 from lml.plugin import PluginManager
 
-from mock import patch
+from unittest.mock import patch
 from pytest import raises