Skip to content

Commit 0acaa7f

Browse files
authored
Use built-in unittest.mock (#938)
Use built-in Python 3 unittest.mock instead of relying on mock package that is only necessary for ancient versions of Python.
1 parent 7c4700b commit 0acaa7f

File tree

3 files changed

+4
-4
lines changed

3 files changed

+4
-4
lines changed

.github/workflows/test.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -56,7 +56,7 @@ jobs:
5656
5757
- name: Install dependency
5858
run: |
59-
pip install -U cryptography PyNaCl pytest pytest-cov mock coveralls
59+
pip install -U cryptography PyNaCl pytest pytest-cov coveralls
6060
6161
- name: Set up MySQL
6262
run: |

pymysql/tests/test_connection.py

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,10 @@
11
import datetime
22
import ssl
33
import sys
4-
import time
5-
import mock
64
import pytest
5+
import time
6+
from unittest import mock
7+
78
import pymysql
89
from pymysql.tests import base
910
from pymysql.constants import CLIENT

requirements-dev.txt

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,3 @@
11
cryptography
22
PyNaCl>=1.4.0
33
pytest
4-
mock

0 commit comments

Comments
 (0)