跳转到主要内容

unittest的Jasmine样式断言

项目描述

Chamomile让在Python单元测试中进行断言变得更加愉快。它大量借鉴了Jasmine的断言语法。看看这里

import chamomile

class ExampleTest(chamomile.Test):
    def test_simple_assertions(self):
        self.expect(12).to_equal(12)
        self.expect(False).to_not_be(0)

        with self.expect(ZeroDivsionError):
            4 / 0

您可以在源代码中轻松浏览所有可用的断言列表。

项目详情


下载文件

下载适合您平台的文件。如果您不确定选择哪个,请了解更多关于安装包的信息。

源代码分布

chamomile-1.0.1.tar.gz (4.2 kB 查看哈希值)

上传时间: 源代码

由以下赞助

AWS AWS 云计算和安全赞助商 Datadog Datadog 监控 Fastly Fastly CDN Google Google 下载分析 Microsoft Microsoft PSF 赞助商 Pingdom Pingdom 监控 Sentry Sentry 错误记录 StatusPage StatusPage 状态页面