From 0ccc7bbb34100c1de1b407da741db06fe76bc227 Mon Sep 17 00:00:00 2001 From: Benjamin Peterson Date: Sat, 3 Apr 2010 16:06:42 +0000 Subject: [PATCH] stop CObject deprecation warnings in test___all__ --- Lib/bsddb/__init__.py | 2 ++ Lib/test/test___all__.py | 1 + 2 files changed, 3 insertions(+) diff --git a/Lib/bsddb/__init__.py b/Lib/bsddb/__init__.py index fa44900a30d..ed4deeaeb8c 100644 --- a/Lib/bsddb/__init__.py +++ b/Lib/bsddb/__init__.py @@ -48,6 +48,8 @@ if (sys.version_info >= (2, 6)) and (sys.version_info < (3, 0)) : warnings.warnpy3k("in 3.x, the bsddb module has been removed; " "please use the pybsddb project instead", DeprecationWarning, 2) + warnings.filterwarnings("ignore", ".*CObject.*", DeprecationWarning, + "bsddb.__init__") try: if __name__ == 'bsddb3': diff --git a/Lib/test/test___all__.py b/Lib/test/test___all__.py index 596ad796406..803609a8eb9 100644 --- a/Lib/test/test___all__.py +++ b/Lib/test/test___all__.py @@ -1,5 +1,6 @@ from __future__ import print_function +import bsddb import unittest from test import test_support as support import os