From c293704e93adfe45961bcf8456a2c244970c443e Mon Sep 17 00:00:00 2001 From: Tim Peters Date: Thu, 14 Nov 2002 16:23:29 +0000 Subject: [PATCH] This uses only one temp file at a time, so use test_support.TESTFN as the name instead of enduring nanny "security warnings" from tempfile.mktemp(). --- Lib/test/test_bz2.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/Lib/test/test_bz2.py b/Lib/test/test_bz2.py index 072a89ee7f1..104d7e0eb5c 100644 --- a/Lib/test/test_bz2.py +++ b/Lib/test/test_bz2.py @@ -1,11 +1,11 @@ #!/usr/bin/python from test import test_support +from test.test_support import TESTFN import unittest from cStringIO import StringIO import os import popen2 -import tempfile import sys import bz2 @@ -40,7 +40,7 @@ class BZ2FileTest(BaseTest): "Test MCRYPT type miscelaneous methods." def setUp(self): - self.filename = tempfile.mktemp("bz2") + self.filename = TESTFN def tearDown(self): if os.path.isfile(self.filename):