From 504a32446cc5263a934aa815494356a7c38b4b13 Mon Sep 17 00:00:00 2001 From: Torsten Werner Date: Sun, 9 Jan 2011 15:05:13 +0100 Subject: [PATCH] suppress warnings when running tests in squeeze Signed-off-by: Torsten Werner --- tests/base_test.py | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) diff --git a/tests/base_test.py b/tests/base_test.py index d99ce416..dc606cc7 100644 --- a/tests/base_test.py +++ b/tests/base_test.py @@ -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 -- 2.39.5