Try import mock, but on python 3.3+ can use also stdlib unittest.mock

From Python 3.3 is mock part of python standard library in unittest namespace
This commit is contained in:
Ondřej Súkup 2018-06-22 22:58:16 +02:00 committed by Ondřej Súkup
parent 630428c611
commit deff54aae0
No known key found for this signature in database
GPG Key ID: 18E6D11A219AF3B7
2 changed files with 6 additions and 1 deletions

View File

@ -157,6 +157,7 @@ Oleg Sushchenko
Oliver Bestwalter
Omar Kohl
Omer Hadari
Ondřej Súkup
Patrick Hayes
Paweł Adamczak
Pedro Algarvio

View File

@ -1,7 +1,11 @@
from __future__ import absolute_import, division, print_function
import os
import sys
import mock
try:
import mock
except ImportError:
import unittest.mock as mock
import pytest
from _pytest.mark import (
MarkGenerator as Mark,