haystack icon indicating copy to clipboard operation
haystack copied to clipboard

Automate testing of code in docstrings

Open masci opened this issue 1 year ago • 2 comments

Let's automate testing code in docstrings - https://docs.python.org/3/library/doctest.html

masci avatar Feb 23 '24 11:02 masci

Superseded by https://github.com/deepset-ai/haystack/issues/7074, so let's make this one about adding automated testing.

shadeMe avatar Feb 26 '24 15:02 shadeMe

Putting this back in the backlog after some discussion.

We thought it would be simpler to add testing of docstrings snippets but is not. We'd have to change how we define the snippets as doctest expects a specific format, or create our own parser.

Another issue would be handling secrets in some examples too.

silvanocerza avatar Feb 27 '24 14:02 silvanocerza