|
1 | 1 | import os |
2 | | -import io |
3 | 2 | import sys |
4 | 3 | from test.support import TESTFN, rmtree, unlink, captured_stdout |
5 | 4 | import unittest |
6 | 5 |
|
7 | 6 | import trace |
8 | | -from trace import CoverageResults, Trace |
| 7 | +from trace import Trace |
9 | 8 |
|
10 | 9 | from test.tracedmodules import testmod |
11 | 10 |
|
@@ -366,50 +365,5 @@ def test_ignored(self): |
366 | 365 | self.assertTrue(ignore.names(jn('bar', 'baz.py'), 'baz')) |
367 | 366 |
|
368 | 367 |
|
369 | | -class TestDeprecatedMethods(unittest.TestCase): |
370 | | - |
371 | | - def test_deprecated_usage(self): |
372 | | - sio = io.StringIO() |
373 | | - with self.assertWarns(DeprecationWarning): |
374 | | - trace.usage(sio) |
375 | | - self.assertIn('Usage:', sio.getvalue()) |
376 | | - |
377 | | - def test_deprecated_Ignore(self): |
378 | | - with self.assertWarns(DeprecationWarning): |
379 | | - trace.Ignore() |
380 | | - |
381 | | - def test_deprecated_modname(self): |
382 | | - with self.assertWarns(DeprecationWarning): |
383 | | - self.assertEqual("spam", trace.modname("spam")) |
384 | | - |
385 | | - def test_deprecated_fullmodname(self): |
386 | | - with self.assertWarns(DeprecationWarning): |
387 | | - self.assertEqual("spam", trace.fullmodname("spam")) |
388 | | - |
389 | | - def test_deprecated_find_lines_from_code(self): |
390 | | - with self.assertWarns(DeprecationWarning): |
391 | | - def foo(): |
392 | | - pass |
393 | | - trace.find_lines_from_code(foo.__code__, ["eggs"]) |
394 | | - |
395 | | - def test_deprecated_find_lines(self): |
396 | | - with self.assertWarns(DeprecationWarning): |
397 | | - def foo(): |
398 | | - pass |
399 | | - trace.find_lines(foo.__code__, ["eggs"]) |
400 | | - |
401 | | - def test_deprecated_find_strings(self): |
402 | | - with open(TESTFN, 'w') as fd: |
403 | | - self.addCleanup(unlink, TESTFN) |
404 | | - with self.assertWarns(DeprecationWarning): |
405 | | - trace.find_strings(fd.name) |
406 | | - |
407 | | - def test_deprecated_find_executable_linenos(self): |
408 | | - with open(TESTFN, 'w') as fd: |
409 | | - self.addCleanup(unlink, TESTFN) |
410 | | - with self.assertWarns(DeprecationWarning): |
411 | | - trace.find_executable_linenos(fd.name) |
412 | | - |
413 | | - |
414 | 368 | if __name__ == '__main__': |
415 | 369 | unittest.main() |
0 commit comments