nose-parameterized

Yazılım ekran görüntüsü:
nose-parameterized
Yazılım detaylar:
Versiyon: 0.3.1
Qayıt: 14 Apr 15
Geliştirici: David Wolever
Lisans: Ücretsiz
Popülerlik: 3

Rating: 3.0/5 (Total Votes: 1)

Burun-patameterized burun ile parametreli test için bir dekoratör olduğunu.
Burun. Bu testi jeneratörler var. Ama onlar tür, çünkü emmek:
- Genellikle ikinci işlevi gerektirir
- Onlar zor testin verileri ayırmak için yapmak
- Onlar unittest.TestCase ve subclases ile çalışmak yok
Ama düzeltmeler bu burun-parametreli.
Buna bir bak:
 Kedi test_math.py
nose.tools ithalat assert_equal gelen
parametreli nose_parameterized ithalattan
ithalat unittest
ithalat matematik
parameterized ([
& Nbsp (2, 2, 4),
& Nbsp (2, 3, 8),
& Nbsp (1, 9, 1),
& Nbsp; (0, 9, 0),
])
def test_pow (baz, üs, beklenen):
& Nbsp; assert_equal (Math.pow (taban, üs), beklenen)
sınıf 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 (öz, giriş, beklenen):
& Nbsp; assert_equal (Math.floor (giriş), beklenen)
$ Nosetests v test_math.py
test_math.test_pow (2, 2, 4) ... Tamam
test_math.test_pow (2, 3, 8) ... Tamam
test_math.test_pow (1, 9, 1) ... Tamam
test_math.test_pow (0, 9, 0) ... Tamam
test_floor_0 (test_math.TestMathUnitTest) ... Tamam
test_floor_1 (test_math.TestMathUnitTest) ... Tamam
test_floor_2 (test_math.TestMathUnitTest) ... Tamam
-------------------------------------------------- --------------------
0.002s 7 testleri Ran
Tamam

Gereksinimler :

  • Python
  • burun

Benzer yazılım

Scalasca
Scalasca

20 Feb 15

Tail
Tail

3 Jun 15

nose-quickunit
nose-quickunit

20 Feb 15

Peptest
Peptest

14 Apr 15

Yorumlar nose-parameterized

Yorum Bulunamadı
Yorum eklemek
Görüntülerde açın!