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 072a89e..104d7e0 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 @@
"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):