test___all__ ignores ResourceWarning as well

This commit is contained in:
Antoine Pitrou 2010-10-29 11:53:34 +00:00
parent 5efe9d0865
commit a0d2f4def9

View file

@ -15,8 +15,10 @@ class AllTest(unittest.TestCase):
def check_all(self, modname):
names = {}
with support.check_warnings((".* (module|package)",
DeprecationWarning), quiet=True):
with support.check_warnings(
(".* (module|package)", DeprecationWarning),
("", ResourceWarning),
quiet=True):
try:
exec("import %s" % modname, names)
except: