#doctest — Public Fediverse posts
Live and recent posts from across the Fediverse tagged #doctest, aggregated by home.social.
-
@yngvem I added colour to doctest output in Python 3.13 :)
https://docs.python.org/3.13/whatsnew/3.13.html#doctest
Try out the release candidate here: https://www.python.org/download/pre-releases/
-
Published my fork of a #doctest library for #CommonLisp: https://github.com/simendsjo/sijo-doctest
Original library: https://github.com/johanlindberg/doctest
-
I have even played around with a few #microformats on top of JDAML -- one codenamed #Znatchke which is something in between HTML and #Markdown and one which shows how something like #doctest could be implemented with JDAML (suggested by @RyunoKi).
-
When teaching #rust, I often see people have a "Wow 🤯!" experience when I show #rustdoc #doctest system: you write small pieces of Rust code in your documentation and they are then executed as part of your test suite.
What people often don't know is that this system is ancient! I first met in #python and there it was introduced in 1999: https://groups.google.com/g/comp.lang.python/c/DfzH5Nrt05E/m/Yyd3s7fPVxwJ. That's 24 years ago!
I don't know if this was the first implementation of this concept?
-
I created a small #Python #Markdown extension that parses `pycon` syntax code blocks *without indentation and without fences*, and renders them using #pymdownx's Highlight extension 🙂
It will be useful in Python docstrings, to add examples anywhere just how #doctest expects them!
It's immediately available to my sponsors and has been added to the GraviFridge goal (https://pawamoy.github.io/insiders/#1000-gravifridge-user-manual) 😊
-
🌠 I created a #GitHub repository with my #Python solutions for the #AdventOfCode puzzles
🧩 All solutions use only the #PythonStandardLibrary with no need for external packages
🔬 #Tests are included in function #docstrings and can be run using the #doctest module
⚠️ I don't think I will be able to enter the #solutions every day and definitely not in the morning
🐍 I participate in #AoC to #improve my Python #knowledge rather than to compete in the #leaderboard
-
🌠 I created a #GitHub repository with my #Python solutions for the #AdventOfCode puzzles
🧩 All solutions use only the #PythonStandardLibrary with no need for external packages
🔬 #Tests are included in function #docstrings and can be run using the #doctest module
⚠️ I don't think I will be able to enter the #solutions every day and definitely not in the morning
🐍 I participate in #AoC to #improve my Python #knowledge rather than to compete in the #leaderboard
-
🌠 I created a #GitHub repository with my #Python solutions for the #AdventOfCode puzzles
🧩 All solutions use only the #PythonStandardLibrary with no need for external packages
🔬 #Tests are included in function #docstrings and can be run using the #doctest module
⚠️ I don't think I will be able to enter the #solutions every day and definitely not in the morning
🐍 I participate in #AoC to #improve my Python #knowledge rather than to compete in the #leaderboard
-
🌠 I created a #GitHub repository with my #Python solutions for the #AdventOfCode puzzles
🧩 All solutions use only the #PythonStandardLibrary with no need for external packages
🔬 #Tests are included in function #docstrings and can be run using the #doctest module
⚠️ I don't think I will be able to enter the #solutions every day and definitely not in the morning
🐍 I participate in #AoC to #improve my Python #knowledge rather than to compete in the #leaderboard
-
🌠 I created a #GitHub repository with my #Python solutions for the #AdventOfCode puzzles
🧩 All solutions use only the #PythonStandardLibrary with no need for external packages
🔬 #Tests are included in function #docstrings and can be run using the #doctest module
⚠️ I don't think I will be able to enter the #solutions every day and definitely not in the morning
🐍 I participate in #AoC to #improve my Python #knowledge rather than to compete in the #leaderboard
-
@HeidiSeibold I also write tests for my software. They are not primarily for usability but mostly for assuring quality and correctness, but I also think they can serve to demonstrate how the software works or should be expected to work.
In #Python , one testing framework, #doctest , is convenient for incorporating tests as examples into the documentation. This way they can both serve as usage examples in the before-mentioned docstrings and as automated tests. -
Did you know, that @[email protected] once ported #doctest (like known from #python, @[email protected], #cpp, #haskell, @[email protected], @[email protected] ) to @[email protected]?
https://github.com/skippi/docspec#usage
PS: Didn't try it yet but I'm pretty sure that it won't work in current Crystal versions without a patch.
-
Did you know, that @[email protected] once ported @[email protected]'s #doctest to @[email protected]?
https://github.com/skippi/docspec#usage
PS: I didn't try it yet but I'm pretty sure that it won't work in current Crystal versions.
skippi/docspec: A crystal library for automatically testing documentation examples. - https://github.com/skippi/docspec
🐦🔗: https://twitter.com/fusillicode/status/1111950321507594244