一句话:发布含 514 个使用 icontract 标注契约的 Python 函数数据集,用于评估基于契约的测试工具。
基于契约的设计(design-by-contract)在 Python 社区日益流行,已出现多种依据契约自动测试代码的工具,但社区一直缺乏规模足够大且有代表性的带契约 Python 代码库来评估这些工具。为此,作者构建了 Python-by-contract 数据集,其中包含 514 个使用 icontract 库标注契约的 Python 函数。论文展示了该数据集可被现有利用契约的测试工具方便地直接使用,从而为契约测试工具的比较与评估提供了统一基准。作者同时提供了演示视频。
Design-by-contract as a programming technique is becoming popular in Python community as various tools have been developed for automatically testing the code based on the contracts. However, there is no sufficiently large and representative Python code base with contracts to evaluate these different testing tools. We present Python-by-contract dataset containing 514 Python functions annotated with contracts using icontract library. We show that our Python-by-contract dataset can be easily used by existing testing tools that take advantage of contracts. The demo video can be found at https://youtu.be/08wZN-xh6mY.