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