[hipl-dev] [Branch ~hipl-core/hipl/trunk] Rev 6440: Disable distracting log messages during tests

  • From: noreply@xxxxxxxxxxxxx
  • To: HIPL core team <hipl-dev@xxxxxxxxxxxxx>
  • Date: Wed, 30 Oct 2013 18:47:28 -0000

------------------------------------------------------------
revno: 6440
committer: Paul Tötterman <paul.totterman@xxxxxx>
branch nick: trunk
timestamp: Wed 2013-10-30 20:46:27 +0200
message:
  Disable distracting log messages during tests
modified:
  tools/hipdnsproxy/dnsproxy_test.py


--
lp:hipl
https://code.launchpad.net/~hipl-core/hipl/trunk

Your team HIPL core team is subscribed to branch lp:hipl.
To unsubscribe from this branch go to 
https://code.launchpad.net/~hipl-core/hipl/trunk/+edit-subscription
=== modified file 'tools/hipdnsproxy/dnsproxy_test.py'
--- tools/hipdnsproxy/dnsproxy_test.py  2013-10-10 17:43:35 +0000
+++ tools/hipdnsproxy/dnsproxy_test.py  2013-10-30 18:46:27 +0000
@@ -28,6 +28,7 @@
 import DNS
 import dnsproxy
 import logging
+import os
 import subprocess
 import StringIO
 import unittest
@@ -123,7 +124,7 @@
 
 class DNSProxyTest(unittest.TestCase):
     def setUp(self):
-        logging.basicConfig(level=logging.DEBUG)
+        logging.basicConfig(level=logging.DEBUG, stream=open(os.devnull, 'w'))
         self.dnsproxy = dnsproxy.DNSProxy()
         self.dnsproxy.hosts = []
         self.dnsproxy.clisock = MockSocket()

Other related posts:

  • » [hipl-dev] [Branch ~hipl-core/hipl/trunk] Rev 6440: Disable distracting log messages during tests - noreply