nose-parameterized

Programinė įranga Screenshot:
nose-parameterized
Programinė detalės:
Versija: 0.3.1
Įkėlimo datą: 14 Apr 15
Kūrėjas: David Wolever
Licencija: Nemokamai
Populiarumas: 3

Rating: 3.0/5 (Total Votes: 1)

nosies-patameterized yra už sparametryzowane bandymų su nosies dekoratorius.
Nosis. Jis gavo bandymų generatoriai. Bet jie rūšies čiulpia, nes:
- Jie dažnai reikalauja antrą funkciją
- Jie sunku atskirti duomenis iš bandymo
- Jie neveikia su subclases iš unittest.TestCase
Tačiau nosies-sparametryzowane pataisymai, kad.
Pasižiūrėk:
 Kačių test_math.py
nuo nose.tools importo assert_equal
nuo nose_parameterized importo Parametrizuoto
importo unittest
importo matematika
parameterized ([
& Nbsp; (2, 2, 4),
& Nbsp; (2, 3, 8),
& Nbsp; (1, 9, 1),
& Nbsp; (0, 9, 0),
])
Def test_pow (pagrindas, eksponentė, tikimasi):
& Nbsp; assert_equal (math.pow (pagrindas, eksponentė), tikimasi)
klasė TestMathUnitTest (unittest.TestCase):
& Nbsp; @ parameterized.expand ([
& Nbsp; (- 1.5, -2.0)
& Nbsp; (1.0, 1.0),
& Nbsp; (1.6, 1),
& Nbsp;])
& Nbsp; def test_floor (savarankiškai, įvesties, tikimasi):
& Nbsp; assert_equal (math.floor (sąnaudos), tikimasi)
$ 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
-------------------------------------------------- --------------------
Ran 7 bandymus 0.002s
Gerai

Reikalavimai :

  • Python
  • nosies

Panaši programinė įranga

AceUnit
AceUnit

2 Jun 15

rhinoplasty
rhinoplasty

14 Apr 15

bug-repo-syncer
bug-repo-syncer

14 Apr 15

tl.testing
tl.testing

15 Apr 15

Komentarai nose-parameterized

Komentarai nerastas
Pridėti komentarą
Pasukite ant paveikslėlio!