matchmaker

軟件截圖:
matchmaker
軟件詳細信息:
版本: 0.1.3
上傳日期: 14 Apr 15
許可: 免費
人氣: 33

Rating: 1.0/5 (Total Votes: 1)

紅娘提供裝飾,簡化了創建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中

類似的軟件

zope_fixtures
zope_fixtures

20 Feb 15

JSCPP
JSCPP

3 Jun 15

QSnipps
QSnipps

12 May 15

Flyspray
Flyspray

3 Jun 15

意見 matchmaker

評論沒有發現
添加評論
打開圖片!