[pyftpdlib] r1251 committed - recofingure logging level during tests

0 views
Skip to first unread message

pyft...@googlecode.com

unread,
Apr 11, 2014, 1:00:36 PM4/11/14
to pyftpdli...@googlegroups.com
Revision: 1251
Author: g.rodola
Date: Fri Apr 11 17:00:22 2014 UTC
Log: recofingure logging level during tests
http://code.google.com/p/pyftpdlib/source/detail?r=1251

Modified:
/trunk/test/test_ftpd.py

=======================================
--- /trunk/test/test_ftpd.py Mon Dec 30 11:46:07 2013 UTC
+++ /trunk/test/test_ftpd.py Fri Apr 11 17:00:22 2014 UTC
@@ -162,6 +162,14 @@
RuntimeWarning)


+def configure_logging():
+ """Set pyftpdlib logger to "WARNING" level."""
+ channel = logging.StreamHandler()
+ logger = logging.getLogger('pyftpdlib')
+ logger.setLevel(logging.WARNING)
+ logger.addHandler(channel)
+
+
def disable_log_warning(inst):
"""Temporarily set FTP server's logging level to ERROR."""

@@ -3609,7 +3617,7 @@
self.assertRaises(SystemExit, pyftpdlib.__main__.main)


-logging.basicConfig(level=logging.WARNING)
+configure_logging()
remove_test_files()


Reply all
Reply to author
Forward
0 new messages