Open ArneBachmann opened 7 years ago
@ArneBachmann That's a good point! Putting this on the v1.3.1 milestone.
Any progress? Would need to somehow AST the docstrings and transpile them as well. It's definitely a minor feature, as doctest is only used by 5% of all people vs. pytest, unitest etc. I, however, do use it, because it doesn't require external libraries and can be tested on every import of a file.
This broke my tests, when I attempted to use the
print <| round(...)
syntax into the docstrings.Or, as an alternative solution, run doctest's docstrings somehow through the coconut interpreter instead of the Python interpreter (monkey-patch the doctest internals somehow or replace it by _coconut_doctest?)