diff options
| author | Ezio Melotti <ezio.melotti@gmail.com> | 2013-02-20 00:54:50 (GMT) |
|---|---|---|
| committer | Ezio Melotti <ezio.melotti@gmail.com> | 2013-02-20 00:54:50 (GMT) |
| commit | 1758d9cf8ee837219452b04965f833904cc124bb (patch) | |
| tree | 3b9344b7df582b6b14a20969adaa695be2da5f5e /Lib/test | |
| parent | 87632f1a9ec1dd310df1b0addc4c8842d83828bf (diff) | |
| parent | 5a9ce077e0f59c34032f194e3ee0e4849b269c77 (diff) | |
| download | cpython-1758d9cf8ee837219452b04965f833904cc124bb.zip cpython-1758d9cf8ee837219452b04965f833904cc124bb.tar.gz cpython-1758d9cf8ee837219452b04965f833904cc124bb.tar.bz2 | |
#17143: merge with 3.3.
Diffstat (limited to 'Lib/test')
| -rw-r--r-- | Lib/test/test_trace.py | 11 |
1 files changed, 6 insertions, 5 deletions
diff --git a/Lib/test/test_trace.py b/Lib/test/test_trace.py index b2cd728..1cec710 100644 --- a/Lib/test/test_trace.py +++ b/Lib/test/test_trace.py @@ -3,7 +3,6 @@ import io import sys from test.support import (run_unittest, TESTFN, rmtree, unlink, captured_stdout) -import tempfile import unittest import trace @@ -396,14 +395,16 @@ class TestDeprecatedMethods(unittest.TestCase): trace.find_lines(foo.__code__, ["eggs"]) def test_deprecated_find_strings(self): + with open(TESTFN, 'w') as fd: + self.addCleanup(unlink, TESTFN) with self.assertWarns(DeprecationWarning): - with tempfile.NamedTemporaryFile() as fd: - trace.find_strings(fd.name) + trace.find_strings(fd.name) def test_deprecated_find_executable_linenos(self): + with open(TESTFN, 'w') as fd: + self.addCleanup(unlink, TESTFN) with self.assertWarns(DeprecationWarning): - with tempfile.NamedTemporaryFile() as fd: - trace.find_executable_linenos(fd.name) + trace.find_executable_linenos(fd.name) def test_main(): |
