Kaydet (Commit) 5a9ce077 authored tarafından Ezio Melotti's avatar Ezio Melotti

#17143: fix buildbot failures on Windows.

üst 6cd6f015
......@@ -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():
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment