From: Tim Peters Date: Thu, 14 Nov 2002 16:23:29 +0000 (+0000) Subject: This uses only one temp file at a time, so use test_support.TESTFN as X-Git-Tag: v2.3c1~3421 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=c293704e93adfe45961bcf8456a2c244970c443e;p=python 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(). --- diff --git a/Lib/test/test_bz2.py b/Lib/test/test_bz2.py index 072a89ee7f..104d7e0eb5 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):