]> git.decadent.org.uk Git - dak.git/commitdiff
suppress warnings when running tests in squeeze
authorTorsten Werner <twerner@debian.org>
Sun, 9 Jan 2011 14:05:13 +0000 (15:05 +0100)
committerTorsten Werner <twerner@debian.org>
Mon, 10 Jan 2011 21:10:58 +0000 (22:10 +0100)
Signed-off-by: Torsten Werner <twerner@debian.org>
tests/base_test.py

index d99ce4166c6ebae64d122bb16741df20a362c0a7..dc606cc7feb8cca9ed6b259db65c84a2007f257b 100644 (file)
@@ -1,11 +1,27 @@
 import os
 import sys
 import unittest
+import warnings
 
 from os.path import abspath, dirname, join
 
 DAK_ROOT_DIR = dirname(dirname(abspath(__file__)))
 
+# suppress some deprecation warnings in squeeze related to apt_pkg,
+# debian, and md5 modules
+warnings.filterwarnings('ignore', \
+    "Attribute '.*' of the 'apt_pkg\.Configuration' object is deprecated, use '.*' instead\.", \
+    DeprecationWarning)
+warnings.filterwarnings('ignore', \
+    "apt_pkg\.newConfiguration\(\) is deprecated\. Use apt_pkg\.Configuration\(\) instead\.", \
+    DeprecationWarning)
+warnings.filterwarnings('ignore', \
+    "please use 'debian' instead of 'debian_bundle'", \
+    DeprecationWarning)
+warnings.filterwarnings('ignore', \
+    "the md5 module is deprecated; use hashlib instead", \
+    DeprecationWarning)
+
 class DakTestCase(unittest.TestCase):
     def setUp(self):
         pass