]> 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>
Sun, 9 Jan 2011 14:12:19 +0000 (15:12 +0100)
Signed-off-by: Torsten Werner <twerner@debian.org>
tests/test_all.py

index 32e58ababa59dbd658a194357b51ea32166f9bcf..94b89c4305285fe1c5cd7508674acf4fc7d8bc0f 100755 (executable)
@@ -3,6 +3,22 @@
 
 import os
 import unittest
+import warnings
+
+# 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)
 
 def suite():
     suite = unittest.TestSuite()