prefer newer unittest.mock from the standad library

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

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

@ -4,7 +4,10 @@ import subprocess
import tempfile import tempfile
import unittest import unittest
import mock try:
from unittest import mock
except ImportError:
import mock
import ansible_mitogen.target import ansible_mitogen.target
import testlib import testlib

@ -1,4 +1,7 @@
import mock try:
from unittest import mock
except ImportError:
import mock
import testlib import testlib

@ -4,7 +4,10 @@ import types
import zlib import zlib
import unittest import unittest
import mock try:
from unittest import mock
except ImportError:
import mock
import mitogen.core import mitogen.core
import mitogen.utils import mitogen.utils

@ -1,7 +1,10 @@
import errno import errno
import select import select
import mock try:
from unittest import mock
except ImportError:
import mock
import testlib import testlib
import mitogen.core import mitogen.core

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

@ -2,7 +2,10 @@ import sys
import struct import struct
import unittest import unittest
import mock try:
from unittest import mock
except ImportError:
import mock
import mitogen.core import mitogen.core
import mitogen.master import mitogen.master

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

@ -6,7 +6,10 @@ import sys
import time import time
import unittest import unittest
import mock try:
from unittest import mock
except ImportError:
import mock
import testlib import testlib
import mitogen.core import mitogen.core

@ -1,4 +1,7 @@
import mock try:
from unittest import mock
except ImportError:
import mock
import mitogen.core import mitogen.core
import mitogen.parent import mitogen.parent

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

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

@ -1,4 +1,7 @@
import mock try:
from unittest import mock
except ImportError:
import mock
import mitogen.core import mitogen.core
import mitogen.parent import mitogen.parent

Loading…
Cancel
Save