From: Jeremy Hylton Date: Mon, 20 Aug 2001 20:10:01 +0000 (+0000) Subject: Silence warnings during test_os X-Git-Tag: v2.2a3~409 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=a7fc21baf63e8a95f099ff20bccde7b90c9e2253;p=thirdparty%2FPython%2Fcpython.git Silence warnings during test_os --- diff --git a/Lib/test/test_os.py b/Lib/test/test_os.py index 470e347dbca6..0ea9f789844d 100644 --- a/Lib/test/test_os.py +++ b/Lib/test/test_os.py @@ -4,6 +4,7 @@ import os import unittest +import warnings from test_support import TESTFN, run_unittest @@ -29,6 +30,8 @@ class TemporaryFileTests(unittest.TestCase): def test_tempnam(self): if not hasattr(os, "tempnam"): return + warnings.filterwarnings("ignore", "tempnam", RuntimeWarning, + "test_os") self.check_tempfile(os.tempnam()) name = os.tempnam(TESTFN) @@ -51,6 +54,8 @@ class TemporaryFileTests(unittest.TestCase): def test_tmpnam(self): if not hasattr(os, "tmpnam"): return + warnings.filterwarnings("ignore", "tmpnam", RuntimeWarning, + "test_os") self.check_tempfile(os.tmpnam())