Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Commit c293704

Browse files
committed
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().
1 parent 28f2f88 commit c293704

1 file changed

Lines changed: 2 additions & 2 deletions

File tree

Lib/test/test_bz2.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,11 @@
11
#!/usr/bin/python
22
from test import test_support
3+
from test.test_support import TESTFN
34

45
import unittest
56
from cStringIO import StringIO
67
import os
78
import popen2
8-
import tempfile
99
import sys
1010

1111
import bz2
@@ -40,7 +40,7 @@ class BZ2FileTest(BaseTest):
4040
"Test MCRYPT type miscelaneous methods."
4141

4242
def setUp(self):
43-
self.filename = tempfile.mktemp("bz2")
43+
self.filename = TESTFN
4444

4545
def tearDown(self):
4646
if os.path.isfile(self.filename):

0 commit comments

Comments
 (0)