Ok, prossima cosa da vedere https://docs.python.org/3/library/doctest.html #python #doctest #testing
Ebenso kannte ich zwar "#unittest", aber "#doctest" war neu für mich, und auf den ersten Blick sogar eleganter, da die Tests im jeweiligen #docstring definiert werden, damit sofort erkennbar sind und auch noch als Dokumentation herhalten können. #python3
#Unittest #doctest #docstring #python3
I just completed "Tuning Trouble" - Day 6 - Advent of Code 2022 #AdventOfCode https://adventofcode.com/2022/day/6
#adventofcode #python #doctest
🌠 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
#github #python #adventofcode #pythonstandardlibrary #tests #docstrings #doctest #solutions #aoc #improve #knowledge #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 @skippi_io@twitter.com once ported #doctest (like known from #python, @elixirlang@twitter.com, #cpp, #haskell, @rustlang@twitter.com, @elmlang@twitter.com ) to @CrystalLanguage@twitter.com?
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.
#doctest #python #cpp #haskell
Did you know, that @skippi_io@twitter.com once ported @elixirlang@twitter.com's #doctest to @CrystalLanguage@twitter.com?
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.
RT @fusillicode@twitter.com
skippi/docspec: A crystal library for automatically testing documentation examples. - https://github.com/skippi/docspec
🐦🔗: https://twitter.com/fusillicode/status/1111950321507594244