mirror of
https://github.com/python/cpython.git
synced 2025-08-04 08:59:19 +00:00
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:
parent
28f2f88c31
commit
c293704e93
1 changed files with 2 additions and 2 deletions
|
@ -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):
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue