Skip to content

Commit 047df05

Browse files
prefer new unittest.mock from the standard library (#280)
Co-authored-by: Doyle Rowland <[email protected]>
1 parent 2a6f86f commit 047df05

File tree

1 file changed

+5
-1
lines changed

1 file changed

+5
-1
lines changed

tests/test_utility_functions.py

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -36,9 +36,13 @@
3636
- is_some_sort_of_code()
3737
"""
3838

39+
try:
40+
from unittest.mock import patch
41+
except ImportError:
42+
from mock import patch
43+
3944
# Third Party Imports
4045
import pytest
41-
from mock import patch
4246

4347
# docformatter Package Imports
4448
import docformatter

0 commit comments

Comments
 (0)