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().
This commit is contained in:
Tim Peters 2002-11-14 16:23:29 +00:00
parent 28f2f88c31
commit c293704e93
1 changed files with 2 additions and 2 deletions

View File

@ -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):