PYTHON PROGRAMMING

Configuring Pytest to Run Doctest

Learn how to configure pytest in pyproject.toml to run doctests

Marcin Kozak
Towards Data Science
10 min readApr 2, 2024

--

Photo by Paul Hanaoka on Unsplash

Modern Python projects are managed by pyproject.toml files. You can use it to manage both regular projects and Python packages, which makes this file a general tool to set up Python projects of various types.

--

--

A full professor, interdisciplinary researcher, data scientist, statistician, Python, R and Go developer, open-source contributor — and a devoted writer