aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/Lib/test/test_trace.py
diff options
context:
space:
mode:
authorSenthil Kumaran <senthil@uthcode.com>2016-01-11 07:09:42 -0800
committerSenthil Kumaran <senthil@uthcode.com>2016-01-11 07:09:42 -0800
commit96b531abd5bac9707e1b8f714c4d9259958726f9 (patch)
tree116553d357e375ab139f5d4d0c0ee63069f682aa /Lib/test/test_trace.py
parentf7272a667e9964fd203ab21ca6fe12f0e5b38a8a (diff)
downloadcpython-96b531abd5bac9707e1b8f714c4d9259958726f9.tar.gz
cpython-96b531abd5bac9707e1b8f714c4d9259958726f9.zip
Issue #26069: Remove the deprecated apis in the trace module.
Diffstat (limited to 'Lib/test/test_trace.py')
-rw-r--r--Lib/test/test_trace.py48
1 files changed, 1 insertions, 47 deletions
diff --git a/Lib/test/test_trace.py b/Lib/test/test_trace.py
index 03dff8432da..55a3bfa789e 100644
--- a/Lib/test/test_trace.py
+++ b/Lib/test/test_trace.py
@@ -1,11 +1,10 @@
import os
-import io
import sys
from test.support import TESTFN, rmtree, unlink, captured_stdout
import unittest
import trace
-from trace import CoverageResults, Trace
+from trace import Trace
from test.tracedmodules import testmod
@@ -366,50 +365,5 @@ class Test_Ignore(unittest.TestCase):
self.assertTrue(ignore.names(jn('bar', 'baz.py'), 'baz'))
-class TestDeprecatedMethods(unittest.TestCase):
-
- def test_deprecated_usage(self):
- sio = io.StringIO()
- with self.assertWarns(DeprecationWarning):
- trace.usage(sio)
- self.assertIn('Usage:', sio.getvalue())
-
- def test_deprecated_Ignore(self):
- with self.assertWarns(DeprecationWarning):
- trace.Ignore()
-
- def test_deprecated_modname(self):
- with self.assertWarns(DeprecationWarning):
- self.assertEqual("spam", trace.modname("spam"))
-
- def test_deprecated_fullmodname(self):
- with self.assertWarns(DeprecationWarning):
- self.assertEqual("spam", trace.fullmodname("spam"))
-
- def test_deprecated_find_lines_from_code(self):
- with self.assertWarns(DeprecationWarning):
- def foo():
- pass
- trace.find_lines_from_code(foo.__code__, ["eggs"])
-
- def test_deprecated_find_lines(self):
- with self.assertWarns(DeprecationWarning):
- def foo():
- pass
- 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):
- 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):
- trace.find_executable_linenos(fd.name)
-
-
if __name__ == '__main__':
unittest.main()