other tests to generate warning when they didn't before. In
particular, this cancels not only filters set by -W, but also from
test.regrtest.
import unittest
from test import test_support
+warnings.filterwarnings("ignore",
+ category=RuntimeWarning,
+ message="mktemp", module=__name__)
+
if hasattr(os, 'stat'):
import stat
has_stat = 1
# We must also suppress the RuntimeWarning it generates.
def setUp(self):
self.dir = tempfile.mkdtemp()
- warnings.filterwarnings("ignore",
- category=RuntimeWarning,
- message="mktemp")
def tearDown(self):
if self.dir:
os.rmdir(self.dir)
self.dir = None
- # XXX This clobbers any -W options.
- warnings.resetwarnings()
class mktemped:
_unlink = os.unlink