Use unittest2 in all tests

This allows using features such as TestCase,assertIsInstance on Python
2.6 and earlier.
wip-fakessh-exit-status
Alex Willmer 7 years ago committed by David Wilson
parent d743823a5e
commit 17da6e9998

@ -1,6 +1,7 @@
import logging
import time
import unittest
import unittest2 as unittest
import mitogen.core
import mitogen.master

@ -1,4 +1,4 @@
import unittest
import unittest2 as unittest
import mitogen.core
import testlib

@ -1,7 +1,8 @@
import os
import shutil
import unittest
import unittest2 as unittest
import mitogen.fakessh

@ -1,6 +1,7 @@
import subprocess
import unittest
import unittest2 as unittest
import mitogen.master
import testlib

@ -1,5 +1,5 @@
import unittest
import unittest2 as unittest
import testlib
import id_allocation

@ -2,11 +2,11 @@
import email.utils
import sys
import types
import unittest
import zlib
import mock
import pytest
import unittest2 as unittest
import mitogen.core
import testlib

@ -1,6 +1,7 @@
import os
import unittest
import unittest2 as unittest
import mitogen
import mitogen.ssh

@ -1,7 +1,8 @@
import subprocess
import time
import unittest
import unittest2 as unittest
import testlib
import mitogen.master
@ -15,7 +16,7 @@ class ScanCodeImportsTest(unittest.TestCase):
self.assertEquals(list(self.func(co)), [
(-1, 'subprocess', ()),
(-1, 'time', ()),
(-1, 'unittest', ()),
(-1, 'unittest2', ()),
(-1, 'testlib', ()),
(-1, 'mitogen.master', ()),
])

@ -1,5 +1,6 @@
import inspect
import unittest
import unittest2 as unittest
import mitogen.master

@ -1,5 +1,6 @@
import os
import unittest
import unittest2 as unittest
import testlib

@ -1,9 +1,10 @@
import mock
import subprocess
import unittest
import sys
import unittest2 as unittest
import mitogen.master
import testlib

@ -1,5 +1,6 @@
import unittest
import unittest2 as unittest
import mitogen.master
import testlib

@ -1,10 +1,9 @@
import unittest
import mitogen
import mitogen.ssh
import mitogen.utils
import unittest2 as unittest
import testlib
import plain_old_module

@ -5,9 +5,10 @@ import re
import socket
import sys
import time
import unittest
import urlparse
import unittest2 as unittest
import mitogen.master
if mitogen.is_master: # TODO: shouldn't be necessary.
import docker

@ -1,6 +1,6 @@
#!/usr/bin/env python
import unittest
import unittest2 as unittest
import mitogen.master
import mitogen.utils

Loading…
Cancel
Save