Long-press run does not clear console
Both in Pythonista2 and Pythonista3 (latest betas) a long press to run (i.e. with args in 2; either with args or doctest in 3) does not clear the console if clear output before running is set in settings. I don't know whether this is by design, but (especially with verbose option; great option BTW) the doctest output tends to get longish, so this behaviour may lead to confusing output
This should be fixed in the latest P3 beta (forgot to mention in the release notes).
Btw, I've also removed the "verbose" option for doctest output. The new UI shows doctest results directly in the editor, which is better than both of the old output modes, I think.
Great! Also the PEP8.
run with argsclears the console now,
docteststill doesn't, although that's merely inconsistent, not an issue, now doctest flags its outcomes in the source file.
doctestfails mysteriously on
with open('test.txt', 'w') as f: pass
PermissionError: [Errno 1] Operation not permitted: 'test.txt'
@Olaf When running doctests the initial directory is the Pythonista app bundle. Try running this as a doctest and you'll see:
""" >>> import os >>> os.getcwd() """
@dgelessus thanks, mystery solved
This applies both inside and outside triple quotes
In long-press run doctest, the
cwddiffers differs from
import doctest doctest.testmod()