forked from pool/python-easydev
35 lines
1.0 KiB
Diff
35 lines
1.0 KiB
Diff
|
|
Index: easydev-0.12.0/test/test_appdirs.py
|
||
|
|
===================================================================
|
||
|
|
--- easydev-0.12.0.orig/test/test_appdirs.py 2020-06-03 19:27:51.000000000 +0200
|
||
|
|
+++ easydev-0.12.0/test/test_appdirs.py 2022-03-16 14:45:51.220342072 +0100
|
||
|
|
@@ -1,4 +1,7 @@
|
||
|
|
-import mock
|
||
|
|
+try:
|
||
|
|
+ from unittest.mock import patch
|
||
|
|
+except:
|
||
|
|
+ from mock import patch
|
||
|
|
|
||
|
|
def test_app():
|
||
|
|
|
||
|
|
@@ -10,17 +13,17 @@ def test_app():
|
||
|
|
app.user_cache_dir
|
||
|
|
app.user_log_dir
|
||
|
|
|
||
|
|
- with mock.patch("sys.platform", "darwin"):
|
||
|
|
+ with patch("sys.platform", "darwin"):
|
||
|
|
from easydev import appdirs
|
||
|
|
app = appdirs.AppDirs("test")
|
||
|
|
getter(app)
|
||
|
|
|
||
|
|
- with mock.patch("sys.platform", "win32"):
|
||
|
|
+ with patch("sys.platform", "win32"):
|
||
|
|
from easydev import appdirs
|
||
|
|
app = appdirs.AppDirs("test")
|
||
|
|
getter(app)
|
||
|
|
|
||
|
|
- with mock.patch("sys.platform", "linux"):
|
||
|
|
+ with patch("sys.platform", "linux"):
|
||
|
|
from easydev import appdirs
|
||
|
|
app = appdirs.AppDirs("test")
|
||
|
|
getter(app)
|