Skip to content

Commit 8080d1d

Browse files
mgornybbc2
authored andcommitted
Use built-in unittest.mock instead of third-party mock
Python 3 has a built-in version of mock available as unittest.mock. Use it instead of installing the third-party package.
1 parent 7d9cd4b commit 8080d1d

File tree

4 files changed

+2
-7
lines changed

4 files changed

+2
-7
lines changed

requirements.txt

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,12 +2,10 @@ bumpversion
22
click
33
flake8>=2.2.3
44
ipython
5-
mock
65
pytest-cov
76
pytest>=3.9
87
sh>=1.09
98
tox
10-
types-mock
119
wheel
1210
twine
1311
portray

tests/test_ipython.py

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,5 @@
11
import os
2-
3-
import mock
2+
from unittest import mock
43

54
import pytest
65

tests/test_main.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,8 +3,8 @@
33
import os
44
import sys
55
import textwrap
6+
from unittest import mock
67

7-
import mock
88
import pytest
99
import sh
1010

tox.ini

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,6 @@ python =
1414

1515
[testenv]
1616
deps =
17-
mock
1817
pytest
1918
coverage
2019
sh
@@ -27,7 +26,6 @@ skip_install = true
2726
deps =
2827
flake8
2928
mypy
30-
types-mock
3129
commands =
3230
flake8 src tests
3331
mypy --python-version=3.11 src tests

0 commit comments

Comments
 (0)