nose-parameterized

軟件截圖:
nose-parameterized
軟件詳細信息:
版本: 0.3.1
上傳日期: 14 Apr 15
開發: David Wolever
許可: 免費
人氣: 3

Rating: 3.0/5 (Total Votes: 1)

鼻patameterized是一個裝飾的參數測試與鼻子。
鼻子。它有測試發生器。但他們那種吸,這是因為:
- 它們往往需要一個第二函數
- 它們使得難以將數據從測試分離
- 它們不與unittest.TestCase的的subclases工作
但鼻參數修補程序。
看看這個:
 貓test_math.py
從nose.tools進口assert_equal
從nose_parameterized進口參數
進口單元測試
進口數學
@Parameterized([
 (2,2,4),
 (2,3,8),
 (1,9,1),
 (0,9,0),
])
高清test_pow(基地,指數,預期):
  assert_equal(math.pow(基地,指數),預期)
類TestMathUnitTest(unittest.TestCase的):
  @ parameterized.expand([
 ( - 1.5,-2.0)
 (1.0,1.0),
 (1.6,1),
 ])
 高清test_floor(自行輸入,拼音):
  assert_equal(math.floor(輸入),預期)
$ nosetests -v test_math.py
test_math.test_pow(2,2,4)... OK
test_math.test_pow(2,3,8)... OK
test_math.test_pow(1,9,1)... OK
test_math.test_pow(0,9,0)... OK
test_floor_0(test_math.TestMathUnitTest)... OK
test_floor_1(test_math.TestMathUnitTest)... OK
test_floor_2(test_math.TestMathUnitTest)... OK
-------------------------------------------------- --------------------
在0.002s跑了7測試
OK

要求

  • 在Python中
  • 在鼻子

類似的軟件

nose-performance
nose-performance

20 Feb 15

Jensor
Jensor

2 Jun 15

pry
pry

14 Apr 15

lava-core
lava-core

14 Apr 15

意見 nose-parameterized

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