summaryrefslogtreecommitdiffstats
path: root/Lib/test
diff options
context:
space:
mode:
authorJeremy Hylton <jeremy@alum.mit.edu>2001-08-20 20:10:01 (GMT)
committerJeremy Hylton <jeremy@alum.mit.edu>2001-08-20 20:10:01 (GMT)
commita7fc21baf63e8a95f099ff20bccde7b90c9e2253 (patch)
treea5416f86b92e0f88471592d17b255765b72cc41a /Lib/test
parentcc8f44b8847d65ba62b3d34bf4b7613414ba0fae (diff)
downloadcpython-a7fc21baf63e8a95f099ff20bccde7b90c9e2253.zip
cpython-a7fc21baf63e8a95f099ff20bccde7b90c9e2253.tar.gz
cpython-a7fc21baf63e8a95f099ff20bccde7b90c9e2253.tar.bz2
Silence warnings during test_os
Diffstat (limited to 'Lib/test')
-rw-r--r--Lib/test/test_os.py5
1 files changed, 5 insertions, 0 deletions
diff --git a/Lib/test/test_os.py b/Lib/test/test_os.py
index 470e347..0ea9f78 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())