Hypothesis-awkward:针对 Awkward Array 的属性测试策略
Hypothesis-awkward: Property-Based Testing Strategies for Awkward Array
浏览论文内容
中文总结 AI 辅助
针对 Awkward Array 的属性测试策略集合,通过生成几乎全部可能的数组实例,覆盖广泛组合空间,已在持续集成中发现 37 个错误,提升了测试可靠性。
中文摘要 AI 辅助
Hypothesis-awkward 是用于 Awkward Array 的 Hypothesis 策略集合。Awkward Array 可以表示各种嵌套、变长、混合类型的数据。许多处理 Awkward Array 的工具被广泛使用并积极开发。这些工具中的许多单元测试用例列出了预定义的输入样本。在实践中,这些样本只能覆盖 Awkward Array 实例的巨大组合空间的一小部分。Hypothesis 是一个 Python 属性测试库,它生成测试数据,可以使测试用例失败,并自动探索边缘情况。Hypothesis-awkward 的主要策略生成几乎所有可能的 Awkward Array,并提供选项来控制布局、数据类型、缺失值、掩码和其他数组属性。使用这些策略编写的属性测试已开始在 Awkward Array 的持续集成中运行;迄今为止,它们覆盖了 Awkward Array 的一小部分,并在其中发现了 37 个错误,以及在 Hypothesis 本身中发现了一个错误。这些策略使 Awkward Array 及其使用工具的测试更加可靠。
英文摘要
Hypothesis-awkward is a collection of Hypothesis strategies for Awkward Array. Awkward Array can represent a wide variety of nested, variable-length, mixed-type data. Many tools that process Awkward Arrays are widely used and actively developed. The unit test cases of many of these tools list predefined input samples. In practice, such samples can cover only a small portion of the vast combinatorial space of Awkward Array instances. Hypothesis, a Python property-based testing library, generates test data that can make test cases fail and automatically explores edge cases. The main strategy of Hypothesis-awkward generates nearly all possible Awkward Arrays, with options to control the layout, data types, missing values, masks, and other array attributes. Property-based tests written with these strategies have begun to run in the continuous integration of Awkward Array; to date, they cover a small part of Awkward Array and have found 37 bugs in it, as well as one in Hypothesis itself. These strategies make the tests of Awkward Array and of the tools that use it more reliable.
发表机构
- Princeton University(普林斯顿大学)
机构由 AI 辅助整理,请以论文原文为准。