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中

類似的軟件

codemetre
codemetre

11 May 15

json-document
json-document

14 Apr 15

nose-skipreq
nose-skipreq

12 May 15

意見 matchmaker

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