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:
parent
630428c611
commit
deff54aae0
1
AUTHORS
1
AUTHORS
|
@ -157,6 +157,7 @@ Oleg Sushchenko
|
|||
Oliver Bestwalter
|
||||
Omar Kohl
|
||||
Omer Hadari
|
||||
Ondřej Súkup
|
||||
Patrick Hayes
|
||||
Paweł Adamczak
|
||||
Pedro Algarvio
|
||||
|
|
|
@ -1,7 +1,11 @@
|
|||
from __future__ import absolute_import, division, print_function
|
||||
import os
|
||||
import sys
|
||||
|
||||
try:
|
||||
import mock
|
||||
except ImportError:
|
||||
import unittest.mock as mock
|
||||
import pytest
|
||||
from _pytest.mark import (
|
||||
MarkGenerator as Mark,
|
||||
|
|
Loading…
Reference in New Issue