[issue9147] dis.show_code() variant that accepts source strings (and returns rather than prints)

Florent Xicluna report at bugs.python.org
Tue Aug 17 11:11:18 CEST 2010


Florent Xicluna <florent.xicluna at gmail.com> added the comment:

The buildbot XP-4 3.x fails on test_dis.
http://www.python.org/dev/buildbot/all/builders/x86%20XP-4%203.x/builds/2770

test_code_info (test.test_dis.CodeInfoTests) ... FAIL
test_show_code (test.test_dis.CodeInfoTests) ... FAIL

======================================================================
FAIL: test_code_info (test.test_dis.CodeInfoTests)
----------------------------------------------------------------------
Traceback (most recent call last):
  File "D:\cygwin\home\db3l\buildarea\3.x.bolen-windows\build\lib\test\test_dis.py", line 359, in test_code_info
    self.assertEqual(dis.code_info(x), expected)
AssertionError: 'Name:              tricky\nFilename:          D:\\cygwin\\home\\db3l\\buildarea [truncated]... != 'Name:              tricky\nFilename:          D:\\cygwin\\home\\db3l\\buildarea [truncated]...
  Name:              tricky
  Filename:          D:\cygwin\home\db3l\buildarea\3.x.bolen-windows\build\lib\test\test_dis.py
  Argument count:    3
  Kw-only arguments: 3
  Number of locals:  8
  Stack size:        7
  Flags:             OPTIMIZED, NEWLOCALS, VARARGS, VARKEYWORDS, GENERATOR
  Constants:
     0: None
-    1: <code object f at 0x03D750F8, file "D:\cygwin\home\db3l\buildarea\3.x.bolen-windows\build\lib\test\test_dis.py", line 246>
?                           - ^   ^
+    1: <code object f at 0x3d750f8, file "D:\cygwin\home\db3l\buildarea\3.x.bolen-windows\build\lib\test\test_dis.py", line 246>
?                            ^   ^
  Variable names:
     0: x
     1: y
     2: z
     3: c
     4: d
     5: e
     6: args
     7: kwds
  Cell variables:
     0: e
     1: d
     2: f
     3: y
     4: x
     5: z

======================================================================
FAIL: test_show_code (test.test_dis.CodeInfoTests)
----------------------------------------------------------------------
Traceback (most recent call last):
  File "D:\cygwin\home\db3l\buildarea\3.x.bolen-windows\build\lib\test\test_dis.py", line 366, in test_show_code
    self.assertEqual(output.getvalue(), expected+"\n")
AssertionError: 'Name:              tricky\nFilename:          D:\\cygwin\\home\\db3l\\buildarea [truncated]... != 'Name:              tricky\nFilename:          D:\\cygwin\\home\\db3l\\buildarea [truncated]...
  Name:              tricky
  Filename:          D:\cygwin\home\db3l\buildarea\3.x.bolen-windows\build\lib\test\test_dis.py
  Argument count:    3
  Kw-only arguments: 3
  Number of locals:  8
  Stack size:        7
  Flags:             OPTIMIZED, NEWLOCALS, VARARGS, VARKEYWORDS, GENERATOR
  Constants:
     0: None
-    1: <code object f at 0x03D750F8, file "D:\cygwin\home\db3l\buildarea\3.x.bolen-windows\build\lib\test\test_dis.py", line 246>
?                           - ^   ^
+    1: <code object f at 0x3d750f8, file "D:\cygwin\home\db3l\buildarea\3.x.bolen-windows\build\lib\test\test_dis.py", line 246>
?                            ^   ^
  Variable names:
     0: x
     1: y
     2: z
     3: c
     4: d
     5: e
     6: args
     7: kwds
  Cell variables:
     0: e
     1: d
     2: f
     3: y
     4: x
     5: z

----------
keywords: +buildbot
nosy: +flox
status: closed -> open

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


More information about the Python-bugs-list mailing list