tests: use unittest.mock with py34+
Fixes https://github.com/pytest-dev/pytest/issues/3965. Has to work around https://github.com/tox-dev/tox/issues/706. No coverage for pluggymaster builds is OK though anyway.
This commit is contained in:
@@ -1,13 +1,19 @@
|
||||
# coding: utf-8
|
||||
from __future__ import absolute_import, division, print_function
|
||||
|
||||
import sys
|
||||
|
||||
import _pytest._code
|
||||
import pytest
|
||||
import mock
|
||||
from test_excinfo import TWMock
|
||||
from six import text_type
|
||||
|
||||
from test_excinfo import TWMock
|
||||
|
||||
try:
|
||||
import mock
|
||||
except ImportError:
|
||||
import unittest.mock as mock
|
||||
|
||||
|
||||
def test_ne():
|
||||
code1 = _pytest._code.Code(compile('foo = "bar"', "", "exec"))
|
||||
|
||||
Reference in New Issue
Block a user