tests: just call log_to_file() from testlib
Now we can run test.sh with MITOGEN_LOG_LEVEL=debug and things just work.
This commit is contained in:
parent
761cd9eaf8
commit
03fcf057dd
|
@ -15,13 +15,6 @@ import mitogen.utils
|
|||
import testlib
|
||||
|
||||
|
||||
import logging
|
||||
logging.basicConfig(level=logging.DEBUG)
|
||||
mitogen.core._v = True
|
||||
mitogen.core._vv = True
|
||||
mitogen.core.IOLOG.setLevel(logging.DEBUG)
|
||||
|
||||
|
||||
class ImporterMixin(testlib.RouterMixin):
|
||||
modname = None
|
||||
|
||||
|
|
|
@ -10,6 +10,8 @@ import urlparse
|
|||
import unittest2
|
||||
|
||||
import mitogen.master
|
||||
import mitogen.utils
|
||||
|
||||
if mitogen.is_master: # TODO: shouldn't be necessary.
|
||||
import docker
|
||||
|
||||
|
@ -17,10 +19,7 @@ if mitogen.is_master: # TODO: shouldn't be necessary.
|
|||
DATA_DIR = os.path.join(os.path.dirname(__file__), 'data')
|
||||
sys.path.append(DATA_DIR)
|
||||
|
||||
|
||||
def set_debug():
|
||||
import logging
|
||||
logging.getLogger('mitogen').setLevel(logging.DEBUG)
|
||||
mitogen.utils.log_to_file()
|
||||
|
||||
|
||||
def data_path(suffix):
|
||||
|
|
|
@ -4,6 +4,7 @@ import tempfile
|
|||
import time
|
||||
import unittest2
|
||||
|
||||
import testlib
|
||||
import mitogen.parent
|
||||
|
||||
|
||||
|
@ -11,8 +12,6 @@ class TtyCreateChildTest(unittest2.TestCase):
|
|||
func = staticmethod(mitogen.parent.tty_create_child)
|
||||
|
||||
def test_dev_tty_open_succeeds(self):
|
||||
import logging
|
||||
logging.basicConfig(level=logging.DEBUG)
|
||||
tf = tempfile.NamedTemporaryFile()
|
||||
try:
|
||||
pid, fd = self.func(
|
||||
|
|
Loading…
Reference in New Issue