Issue #19758: silence PendingDeprecationWarnings in test_importlib.

This commit is contained in:
Eric Snow 2013-12-07 19:37:31 -07:00
parent c0e71cd6e2
commit 5c29424f4b
1 changed files with 8 additions and 4 deletions

View File

@ -10,6 +10,7 @@ import os.path
from test.support import CleanImport from test.support import CleanImport
import unittest import unittest
import sys import sys
import warnings
@ -55,6 +56,9 @@ class LegacyLoader(TestLoader):
HAM = -1 HAM = -1
with warnings.catch_warnings():
warnings.simplefilter("ignore", PendingDeprecationWarning)
@frozen_util.module_for_loader @frozen_util.module_for_loader
def load_module(self, module): def load_module(self, module):
module.ham = self.HAM module.ham = self.HAM