mirror of
https://github.com/Mikaela/Limnoria.git
synced 2024-12-23 03:02:52 +01:00
tests: Use internal mock from Python 3.3+ if available
Closes ProgVal/Limnoria#1088.
This commit is contained in:
parent
a7b1e65bd9
commit
6d20183abf
@ -38,9 +38,12 @@ else:
|
|||||||
skipif = lambda x, y: lambda z:None
|
skipif = lambda x, y: lambda z:None
|
||||||
|
|
||||||
try:
|
try:
|
||||||
import mock
|
from unittest import mock # Python 3.3+
|
||||||
except ImportError:
|
except ImportError:
|
||||||
mock=None
|
try:
|
||||||
|
import mock # Everything else, an external 'mock' library
|
||||||
|
except ImportError:
|
||||||
|
mock = None
|
||||||
|
|
||||||
# so complicated construction because I want to
|
# so complicated construction because I want to
|
||||||
# gain the string 'y' instead of the character 'y'
|
# gain the string 'y' instead of the character 'y'
|
||||||
|
Loading…
Reference in New Issue
Block a user