[New-bugs-announce] [issue24215] test_trace uses test_pprint

Serhiy Storchaka report at bugs.python.org
Sun May 17 07:55:50 CEST 2015


New submission from Serhiy Storchaka:

Converting test_pprint to be unittest discoverable had broke the test_trace that uses test_main from test_pprint.

======================================================================
ERROR: test_coverage (test.test_trace.TestCoverage)
----------------------------------------------------------------------
Traceback (most recent call last):
  File "/home/serhiy/py/cpython/Lib/test/test_trace.py", line 312, in test_coverage
    self._coverage(tracer)
  File "/home/serhiy/py/cpython/Lib/test/test_trace.py", line 305, in _coverage
    tracer.run(cmd)
  File "/home/serhiy/py/cpython/Lib/trace.py", line 500, in run
    self.runctx(cmd, dict, dict)
  File "/home/serhiy/py/cpython/Lib/trace.py", line 508, in runctx
    exec(cmd, globals, locals)
  File "<string>", line 1, in <module>
AttributeError: module 'test.test_pprint' has no attribute 'test_main'

======================================================================
ERROR: test_coverage_ignore (test.test_trace.TestCoverage)
----------------------------------------------------------------------
Traceback (most recent call last):
  File "/home/serhiy/py/cpython/Lib/test/test_trace.py", line 327, in test_coverage_ignore
    self._coverage(tracer)
  File "/home/serhiy/py/cpython/Lib/test/test_trace.py", line 305, in _coverage
    tracer.run(cmd)
  File "/home/serhiy/py/cpython/Lib/trace.py", line 500, in run
    self.runctx(cmd, dict, dict)
  File "/home/serhiy/py/cpython/Lib/trace.py", line 508, in runctx
    exec(cmd, globals, locals)
  File "<string>", line 1, in <module>
AttributeError: module 'test.test_pprint' has no attribute 'test_main'

----------------------------------------------------------------------

The simplest way to fix the regression is to restore test_main in test_pprint. But for now test_pprint is much larger and slower than it was when test_trace was written. Perhaps it is not the best example for testing tracing. Are there better ideas?

----------
components: Tests
messages: 243386
nosy: belopolsky, larry, serhiy.storchaka
priority: release blocker
severity: normal
status: open
title: test_trace uses test_pprint
type: behavior
versions: Python 3.4, Python 3.5

_______________________________________
Python tracker <report at bugs.python.org>
<http://bugs.python.org/issue24215>
_______________________________________


More information about the New-bugs-announce mailing list