ch01: automated tests

This commit is contained in:
Luciano Ramalho
2019-11-20 19:46:31 -03:00
parent d5be725318
commit 64e8bdcd79
5 changed files with 64 additions and 6 deletions

25
01-data-model/README.md Normal file
View File

@@ -0,0 +1,25 @@
# The Python Data Model
Sample code for Chapter 1 of _Fluent Python 2e_ by Luciano Ramalho (O'Reilly, 2020)
## Running the tests
### Doctests
Use Python's standard ``doctest`` module to check stand-alone doctest file:
$ python3 -m doctest frenchdeck.doctest -v
And to check doctests embedded in a module:
$ python3 -m doctest vector2d.py -v
### Jupyter Notebook
Install ``pytest`` and the ``nbval`` plugin:
$ pip install pytest nbval
Run:
$ pytest --nbval