From cd07c4d4ffad1c9a6fa1c1d8857e7aee1290ccf8 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Ond=C5=99ej=20S=C3=BAkup?= Date: Wed, 22 Aug 2018 23:49:40 +0200 Subject: [PATCH] Use unittest.mock if is only aviable from Python 3.3 is mock part of python standard library in unittest namespace --- .../example_scripts/acceptance/fixture_mock_integration.py | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/testing/example_scripts/acceptance/fixture_mock_integration.py b/testing/example_scripts/acceptance/fixture_mock_integration.py index 51f46f82c..c005c9193 100644 --- a/testing/example_scripts/acceptance/fixture_mock_integration.py +++ b/testing/example_scripts/acceptance/fixture_mock_integration.py @@ -1,6 +1,9 @@ """Reproduces issue #3774""" -import mock +try: + import mock +except ImportError: + import unittest.mock as mock import pytest