From ae65107dcc00f49c32e7a57f5840c7698b35cc9e 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/test_all.py | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) diff --git a/tests/test_all.py b/tests/test_all.py index 32e58aba..94b89c43 100755 --- a/tests/test_all.py +++ b/tests/test_all.py @@ -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() -- 2.39.5