mlscraper icon indicating copy to clipboard operation
mlscraper copied to clipboard

Test example code

Open lorey opened this issue 5 years ago • 2 comments

If the code changes, examples break. Maybe there's a way to test example code easily during automated testing.

Found solutions:

  • https://www.sphinx-doc.org/en/master/usage/extensions/doctest.html
  • https://thomas-cokelaer.info/tutorials/sphinx/doctest.html
  • https://gist.github.com/twidi/9ce8ed0e8f92788031daaa78a765da75

lorey avatar Sep 29 '20 09:09 lorey

Code can be included within .rst, maybe just run the code and include it.

lorey avatar Jun 21 '22 13:06 lorey

I created a #28 pull request to address this issue. I'm not using sphinx because I think that pytest solves the problem for now.

leo8198 avatar Aug 18 '22 14:08 leo8198