prefer newer unittest.mock from the standad library

pull/1052/head
Alexandre Detiste 2 months ago committed by Alex Willmer
parent 58235e3675
commit fe54b0ac3f

@ -2,7 +2,11 @@ from __future__ import absolute_import
import os
import tempfile
try:
from unittest import mock
except ImportError:
import mock
import ansible.errors
import ansible.playbook.play_context

@ -4,6 +4,9 @@ import subprocess
import tempfile
import unittest
try:
from unittest import mock
except ImportError:
import mock
import ansible_mitogen.target

@ -1,3 +1,6 @@
try:
from unittest import mock
except ImportError:
import mock
import testlib

@ -4,6 +4,9 @@ import types
import zlib
import unittest
try:
from unittest import mock
except ImportError:
import mock
import mitogen.core

@ -1,6 +1,9 @@
import errno
import select
try:
from unittest import mock
except ImportError:
import mock
import testlib

@ -1,8 +1,12 @@
import logging
import mock
import sys
import unittest
try:
from unittest import mock
except ImportError:
import mock
import testlib
import mitogen.core
import mitogen.master

@ -2,6 +2,9 @@ import sys
import struct
import unittest
try:
from unittest import mock
except ImportError:
import mock
import mitogen.core

@ -1,3 +1,6 @@
try:
from unittest import mock
except ImportError:
import mock
import mitogen.core

@ -6,6 +6,9 @@ import sys
import time
import unittest
try:
from unittest import mock
except ImportError:
import mock
import testlib

@ -1,3 +1,6 @@
try:
from unittest import mock
except ImportError:
import mock
import mitogen.core

@ -1,6 +1,9 @@
import signal
import testlib
try:
from unittest import mock
except ImportError:
import mock
import mitogen.parent

@ -1,9 +1,13 @@
import mock
import textwrap
import subprocess
import sys
import unittest
try:
from unittest import mock
except ImportError:
import mock
import mitogen.master
import testlib

@ -1,3 +1,6 @@
try:
from unittest import mock
except ImportError:
import mock
import mitogen.core

Loading…
Cancel
Save