Skip to content

Commit cd07c4d

Browse files
committed
Use unittest.mock if is only aviable
from Python 3.3 is mock part of python standard library in unittest namespace
1 parent 2137e2b commit cd07c4d

File tree

1 file changed

+4
-1
lines changed

1 file changed

+4
-1
lines changed

testing/example_scripts/acceptance/fixture_mock_integration.py

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,9 @@
11
"""Reproduces issue #3774"""
22

3-
import mock
3+
try:
4+
import mock
5+
except ImportError:
6+
import unittest.mock as mock
47

58
import pytest
69

0 commit comments

Comments
 (0)