Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

replace old mock by unittest.mock #807

Merged
merged 1 commit into from
Apr 28, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 0 additions & 1 deletion devrequirements.txt
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
mock
coverage
coveralls
cython
2 changes: 1 addition & 1 deletion plyer/tests/test_battery.py
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@
from io import BytesIO
from os.path import join
from textwrap import dedent
from mock import patch, Mock
from unittest.mock import patch, Mock

from plyer.tests.common import PlatformTest, platform_import

Expand Down
2 changes: 1 addition & 1 deletion plyer/tests/test_cpu.py
Original file line number Diff line number Diff line change
Expand Up @@ -11,8 +11,8 @@
import unittest
from os import environ
from os.path import join
from mock import patch, Mock
from textwrap import dedent
from unittest.mock import patch, Mock

from plyer.tests.common import PlatformTest, platform_import, splitpath

Expand Down
5 changes: 3 additions & 2 deletions plyer/tests/test_devicename.py
Original file line number Diff line number Diff line change
Expand Up @@ -7,10 +7,11 @@
* Windows
'''

import socket
import unittest
from mock import patch
from unittest.mock import patch

from plyer.tests.common import PlatformTest, platform_import
import socket


class TestDeviceName(unittest.TestCase):
Expand Down
2 changes: 1 addition & 1 deletion plyer/tests/test_email.py
Original file line number Diff line number Diff line change
Expand Up @@ -8,8 +8,8 @@
'''

import unittest
from unittest.mock import Mock, patch

from mock import Mock, patch
from plyer.tests.common import PlatformTest, platform_import


Expand Down
2 changes: 1 addition & 1 deletion plyer/tests/test_facade.py
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@
import sys
from types import MethodType

from mock import Mock, patch
from unittest.mock import Mock, patch

import plyer

Expand Down
2 changes: 1 addition & 1 deletion plyer/tests/test_notification.py
Original file line number Diff line number Diff line change
Expand Up @@ -13,8 +13,8 @@

from time import sleep
from os.path import dirname, abspath, join
from unittest.mock import Mock, patch

from mock import Mock, patch
from plyer.tests.common import PlatformTest, platform_import


Expand Down
2 changes: 1 addition & 1 deletion plyer/tests/test_screenshot.py
Original file line number Diff line number Diff line change
Expand Up @@ -12,8 +12,8 @@

from os import mkdir, remove
from os.path import join, expanduser, exists
from unittest.mock import patch

from mock import patch
from plyer.tests.common import PlatformTest, platform_import


Expand Down
3 changes: 2 additions & 1 deletion plyer/tests/test_uniqueid.py
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,8 @@
'''

import unittest
from mock import patch, Mock
from unittest.mock import patch, Mock

from plyer.tests.common import PlatformTest, platform_import


Expand Down
2 changes: 1 addition & 1 deletion plyer/tests/test_utils.py
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@
'''

import unittest
from mock import patch
from unittest.mock import patch


class TestUtils(unittest.TestCase):
Expand Down
2 changes: 1 addition & 1 deletion setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@
'ios': ['pyobjus'],
'macosx': ['pyobjus'],
'android': ['pyjnius'],
'dev': ['mock', 'flake8']
'dev': ['flake8']
}
}
)
Expand Down
Loading