[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

[dak/master] disable warnings in base_test instead of test_all



Signed-off-by: Torsten Werner <twerner@debian.org>
---
 tests/base_test.py |   16 ++++++++++++++++
 tests/test_all.py  |   16 ----------------
 2 files changed, 16 insertions(+), 16 deletions(-)

diff --git a/tests/base_test.py b/tests/base_test.py
index d99ce41..dc606cc 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
diff --git a/tests/test_all.py b/tests/test_all.py
index 94b89c4..32e58ab 100755
--- a/tests/test_all.py
+++ b/tests/test_all.py
@@ -3,22 +3,6 @@
 
 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()
-- 
1.5.6.5



Reply to: