matchmaker

软件截图:
matchmaker
软件详细信息:
版本: 0.1.3
上传日期: 14 Apr 15
许可: 免费
人气: 0

Rating: nan/5 (Total Votes: 0)

红娘提供装饰,简化了创建Hamcrest匹配器。
从功能(带有可选合适的文档字符串),创建hamcrest的匹配以最小的额外的编码。
源可以在GitHub上找到。

例如:

从媒人进口匹配
@matcher
高清is_even(项目):
 收益项目%2 == 0
@matcher
高清ends_like(项目,数据,长度= 3):
 “字符串的最后{1}个字符匹配的'{0}'”
 返回item.endswith(数据[-length:])
然后,您可以使用这些在测试中为:
assert_that(数,is_even())
assert_that(文字,ends_like(other_word,4))
错误将显示为:
AssertionError的:
预计:即使是
&NBSP;但是:是<3>
AssertionError的:
预计:字符串的最后4个字符匹配的“大提琴”
&NBSP;但是:是“喂”

要求

  • 在Python中

类似的软件

Zato
Zato

20 Feb 15

LAMPcheck
LAMPcheck

2 Jun 15

rhinoplasty
rhinoplasty

14 Apr 15

qc
qc

14 Apr 15

意见 matchmaker

评论没有发现
添加评论
打开图片!