Message104340
Hi,
I believe this behaviour can be tested if we can prove that Cmd's cmdloop uses raw_input to get the data as against self.stdin.readline().
To test it, ideally I would have liked to override sys.stdin with a fake input stream and pass the list of args (like it's done in test_doctest.py). I can then pass the character codes for Up and Down Arrows in our fake stream and check if the raw_input can use readline and move through the fake input stream but that won't be possible because the C implementation of raw_input uses the readline functionality if only both stdin and stdout are from a terminal.
So alternatively, if we can just ensure that doctest's pdb (_OutputREdirectingPdb) has use_rawinput as 1, we can be assured that readline will be used.
I have attached the svn diff with trunk. Please review and comment
Thanks
Sriram |
|
Date |
User |
Action |
Args |
2010-04-27 17:52:37 | sriram | set | recipients:
+ sriram, ping, georg.brandl, ncoghlan, wosc |
2010-04-27 17:52:36 | sriram | set | messageid: <1272390756.88.0.622898737626.issue5727@psf.upfronthosting.co.za> |
2010-04-27 17:52:35 | sriram | link | issue5727 messages |
2010-04-27 17:52:34 | sriram | create | |
|