This issue tracker has been migrated to GitHub, and is currently read-only.
For more information, see the GitHub FAQs in the Python's Developer Guide.

Author dmalcolm
Recipients dmalcolm, loewis
Date 2010-04-01.16:05:23
SpamBayes Score 1.9817481e-14
Marked as misclassified No
Message-id <1270137929.78.0.467755915831.issue8279@psf.upfronthosting.co.za>
In-reply-to
Content
Thanks for reviewing the gdb work.

I was mistakenly testing using:
   make ; ./python Lib/test/test_gdb.py

which led to path assumptions in the code.

I'm now testing with:
   make ; ./python Lib/test/regrtest.py -v test_gdb

I'm attaching a patch which uses test_support.findfile to locate the test script; the code now works when invoked using either of the above:

$ ./python Lib/test/regrtest.py test_gdb
test_gdb
1 test OK.
[39894 refs]

There was also some breakage of the PyListTests due to significant trailing whitespace within the multiline string containing the expected result.  The trailing whitespace was stripped in test_gdb.py.  I've rewritten these multiline string literals as adjacent single-line string literals, so that this significant whitespace is explicit.  (The output of each line has the line number, then four spaces, then the content of the line from the source file.  An empty source line thus has the number followed by four trailing spaces.)

I've also slightly changed the regex in get_gdb_repr() that carves up what GDB prints, since gdb can insert newlines and spaces in a somewhat arbitrary way, apparently based on the width of the tty that its stdout is connected to.  The tests were passing when run from a full-screen terminal, but some would fail if I resized the terminal to 80 columns (!).  I've tested the new code at both terminal sizes, and piping to "cat" (so that it's not at tty), and all tests now pass for all three cases.
History
Date User Action Args
2010-04-01 16:05:30dmalcolmsetrecipients: + dmalcolm, loewis
2010-04-01 16:05:29dmalcolmsetmessageid: <1270137929.78.0.467755915831.issue8279@psf.upfronthosting.co.za>
2010-04-01 16:05:27dmalcolmlinkissue8279 messages
2010-04-01 16:05:26dmalcolmcreate