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
try:
from unittest import mock
except ImportError:
import mock import mock
import ansible.errors import ansible.errors
import ansible.playbook.play_context import ansible.playbook.play_context

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

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

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

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

@ -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,6 +2,9 @@ import sys
import struct import struct
import unittest import unittest
try:
from unittest import mock
except ImportError:
import mock import mock
import mitogen.core import mitogen.core

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

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

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

@ -1,6 +1,9 @@
import signal import signal
import testlib import testlib
try:
from unittest import mock
except ImportError:
import mock 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,3 +1,6 @@
try:
from unittest import mock
except ImportError:
import mock import mock
import mitogen.core import mitogen.core

Loading…
Cancel
Save