Describe the bug
A clear and concise description of what the bug is followed by the steps to reproduce it:
- Create a markdown file
foo.md with a single shell example:
- Then I run
byexample with python and shell enabled "as usual":
$ byexample -l python,shell foo.md
- As expected the
<...> captures the echo "foo" output. Now try with the +py-doctest option:
$ byexample -l python,shell -o '+py-doctest' foo.md
This time the test fails.
The problem is that +py-doctest modifies, among other things, the flag tags changing it from True to False. This is ok because for compatibility with Python's doctest the equivalent ellipsis are disabled by default.
Unfortunately this change affects other languages like shell in the example above.
Does make sense to restrict +py-doctest to only Python examples? Certainly it is a surprise the current behavior.
Expected behavior
The tags <...> should be treated as usual and only be treated as literal in Python examples when +py-doctest is enabled.
byexample version
$ byexample -V
byexample 10.3.0 (Python 3.9.7) - GNU GPLv3
Describe the bug
A clear and concise description of what the bug is followed by the steps to reproduce it:
foo.mdwith a single shell example:byexamplewith python and shell enabled "as usual":<...>captures theecho "foo"output. Now try with the+py-doctestoption:$ byexample -l python,shell -o '+py-doctest' foo.mdThis time the test fails.
The problem is that
+py-doctestmodifies, among other things, the flagtagschanging it fromTruetoFalse. This is ok because for compatibility with Python'sdoctestthe equivalentellipsisare disabled by default.Unfortunately this change affects other languages like
shellin the example above.Does make sense to restrict
+py-doctestto only Python examples? Certainly it is a surprise the current behavior.Expected behavior
The tags
<...>should be treated as usual and only be treated as literal in Python examples when+py-doctestis enabled.byexample version