生成测试工具 Genty

码农软件 · 软件分类 · 测试工具 · 2019-11-23 09:14:32

软件介绍

Genty,发音 "gen-tee",表示 "生成测试" 的意思。它能帮助生成测试,单个测试可以执行多个输入。

示例,一个文件 sample.py 包括测试代码和测试:

from box.test.genty import genty, genty_repeat, genty_datasetfrom unittest import TestCase# Here's the class under testclass MyClass(object):
    def add_one(self, x):
        return x + 1# Here's the test code@gentyclass MyClassTests(TestCase):
    @genty_dataset(
        (0, 1),
        (100000, 100001),
    )
    def test_add_one(self, value, expected_result):
        actual_result = MyClass().add_one(value)
        self.assertEqual(expected_result, actual_result)


本文地址:https://www.codercto.com/soft/d/19601.html

The Filter Bubble

The Filter Bubble

Eli Pariser / Penguin Press / 2011-5-12 / GBP 16.45

In December 2009, Google began customizing its search results for each user. Instead of giving you the most broadly popular result, Google now tries to predict what you are most likely to click on. Ac......一起来看看 《The Filter Bubble》 这本书的介绍吧!

随机密码生成器
随机密码生成器

多种字符组合密码

SHA 加密
SHA 加密

SHA 加密工具

XML、JSON 在线转换
XML、JSON 在线转换

在线XML、JSON转换工具