Aug-29-2017, 06:03 AM
In my PyClical software, I include doctests. To run these doctests as part of a larger test suite, written as bash shell scripts, I run
ipython --classic --no-banner < test.py > test.out
and compare the output in test.out -- including the '>>> ' prompts -- with previous test output.
Up until recently, this has worked. Now that I am using iPython 5.1, it has stopped working, because iPython is no longer producing '>>> ' prompts, seemingly ignoring the '--classic' option, and instead, it prompts using 'In [1]: ', 'Out[1]: ' etc.
ipython --classic --no-banner < test.py > test.out
and compare the output in test.out -- including the '>>> ' prompts -- with previous test output.
Up until recently, this has worked. Now that I am using iPython 5.1, it has stopped working, because iPython is no longer producing '>>> ' prompts, seemingly ignoring the '--classic' option, and instead, it prompts using 'In [1]: ', 'Out[1]: ' etc.
- Is this a bug in iPython 5.X? Is it known or should I report it?
- Is is actually a bug in iPython versions earlier than 5, that should have ignored the '--classic' option for reasons that I don't understand?
- Was I relying on undocumented behaviour?
- How do I write a test script that works with every users' version of iPython, regardless of this bug? Should I just wait for the bug to be fixed and warn users that they can't test using certain versions of iPython that are known to be buggy?