[New-bugs-announce] [issue13911] test_trace depends on dict repr() ordering

Mark Shannon report at bugs.python.org
Mon Jan 30 00:35:52 CET 2012


New submission from Mark Shannon <mark at hotpy.org>:

Changing PyDict_MINSIZE to 4 causes the following failure
python -m test.test_trace  
... 
======================================================================
ERROR: test_coverage (__main__.TestCoverage)
----------------------------------------------------------------------
Traceback (most recent call last):
  File "/home/mark/python/cpython/Lib/test/test_trace.py", line 307, in test_coverage
    self._coverage(tracer)
  File "/home/mark/python/cpython/Lib/test/test_trace.py", line 300, in _coverage
    tracer.run(cmd)
  File "/home/mark/python/cpython/Lib/trace.py", line 501, in run
    self.runctx(cmd, dict, dict)
  File "/home/mark/python/cpython/Lib/trace.py", line 509, in runctx
    exec(cmd, globals, locals)
  File "<string>", line 1, in <module>
  File "/home/mark/python/cpython/Lib/test/test_pprint.py", line 479, in test_main
    test.support.run_unittest(QueryTestCase)
  File "/home/mark/python/cpython/Lib/test/support.py", line 1403, in run_unittest
    _run_suite(suite)
  File "/home/mark/python/cpython/Lib/test/support.py", line 1378, in _run_suite
    raise TestFailed(err)
test.support.TestFailed: Traceback (most recent call last):
  File "/home/mark/python/cpython/Lib/test/test_pprint.py", line 273, in test_set_reprs
    self.assertEqual(pprint.pformat(cube), cube_repr_tgt)
AssertionError: '{frozenset(): frozenset({frozenset({2}), frozenset({0}), frozenset({1})}),\n fr [truncated]... != '{frozenset(): frozenset({frozenset({2}), frozenset({0}), frozenset({1})}),\n fr [truncated]...
Diff is 1436 characters long. Set self.maxDiff to None to see it.


======================================================================
ERROR: test_coverage_ignore (__main__.TestCoverage)
----------------------------------------------------------------------
Traceback (most recent call last):
  File "/home/mark/python/cpython/Lib/test/test_trace.py", line 322, in test_coverage_ignore
    self._coverage(tracer)
  File "/home/mark/python/cpython/Lib/test/test_trace.py", line 300, in _coverage
    tracer.run(cmd)
  File "/home/mark/python/cpython/Lib/trace.py", line 501, in run
    self.runctx(cmd, dict, dict)
  File "/home/mark/python/cpython/Lib/trace.py", line 509, in runctx
    exec(cmd, globals, locals)
  File "<string>", line 1, in <module>
  File "/home/mark/python/cpython/Lib/test/test_pprint.py", line 479, in test_main
    test.support.run_unittest(QueryTestCase)
  File "/home/mark/python/cpython/Lib/test/support.py", line 1403, in run_unittest
    _run_suite(suite)
  File "/home/mark/python/cpython/Lib/test/support.py", line 1378, in _run_suite
    raise TestFailed(err)
test.support.TestFailed: Traceback (most recent call last):
  File "/home/mark/python/cpython/Lib/test/test_pprint.py", line 273, in test_set_reprs
    self.assertEqual(pprint.pformat(cube), cube_repr_tgt)
AssertionError: '{frozenset(): frozenset({frozenset({2}), frozenset({0}), frozenset({1})}),\n fr [truncated]... != '{frozenset(): frozenset({frozenset({2}), frozenset({0}), frozenset({1})}),\n fr [truncated]...
Diff is 1436 characters long. Set self.maxDiff to None to see it.

----------
components: Tests
messages: 152288
nosy: Mark.Shannon
priority: normal
severity: normal
status: open
title: test_trace  depends on dict repr() ordering
type: behavior

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


More information about the New-bugs-announce mailing list