当前位置: X-MOL 学术arXiv.cs.SE › 论文详情
Our official English website, www.x-mol.net, welcomes your feedback! (Note: you will need to create a separate account there.)
Testing with Jupyter notebooks: NoteBook VALidation (nbval) plug-in for pytest
arXiv - CS - Software Engineering Pub Date : 2020-01-13 , DOI: arxiv-2001.04808
Hans Fangohr, Vidar Fauske, Thomas Kluyver, Maximilian Albert, Oliver Laslett, David Cort\'es-Ortu\~no, Marijan Beg, and Min Ragan-Kelly

The Notebook validation tool nbval allows to load and execute Python code from a Jupyter notebook file. While computing outputs from the cells in the notebook, these outputs are compared with the outputs saved in the notebook file, treating each cell as a test. Deviations are reported as test failures, with various configuration options available to control the behaviour. Application use cases include the validation of notebook-based documentation, tutorials and textbooks, as well as the use of notebooks as additional unit, integration and system tests for the libraries that are used in the notebook. Nbval is implemented as a plugin for the pytest testing software.

中文翻译:

使用 Jupyter 笔记本进行测试:用于 pytest 的 NoteBook VALidation (nbval) 插件

Notebook 验证工具 nbval 允许从 Jupyter 笔记本文件加载和执行 Python 代码。在计算笔记本中单元格的输出时,将这些输出与保存在笔记本文件中的输出进行比较,将每个单元格视为测试。偏差报告为测试失败,可使用各种配置选项来控制行为。应用程序用例包括验证基于笔记本的文档、教程和教科书,以及将笔记本用作笔记本中使用的库的附加单元、集成和系统测试。Nbval 是作为 pytest 测试软件的插件实现的。
更新日期:2020-01-15
down
wechat
bug