ParamUnittest

Software screenshot:
ParamUnittest
Podrobnosti Software:
Verze: 0.2
Datum uploadu: 20 Feb 15
Vývojka: Enrico Franchi
Licence: Volný
Popularita: 2

Rating: 5.0/5 (Total Votes: 1)

ParamUnittest je nástroj, Python navržen tak, aby vytváření parametrizované unit testů, které umožňují pracovat s oficiálním unittest Python balíčku.
Příklad:
import unittest
import paramunittest
@ Paramunittest.parametrized (
& Nbsp; ("1", "2"),
& Nbsp; # (4, 3),
& Nbsp; ("2", "3"),
& Nbsp; (("4",), {"b": "5"}),
& Nbsp; (() {"": 5, "b": 6}),
& Nbsp; {'': 5, "b": 6}
)
třída TestFoo (paramunittest.ParametrizedTestCase):
& Nbsp; def setParameters (self, a, b):
& Nbsp; self.a =
& Nbsp; self.b = b
& Nbsp; def testLess (self):
& Nbsp; self.assertLess (self.a, self.b)
@ Paramunittest.parametrized (
& Nbsp; ("1", "2"),
& Nbsp; # (4, 3),
& Nbsp; ("2", "3"),
& Nbsp; (("4",), {"b": "5"}),
& Nbsp; (() {"": 5, "b": 6}),
& Nbsp; {'': 5, "b": 6}
)
třída TestBar (unittest.TestCase):
& Nbsp; def setParameters (self, a, b):
& Nbsp; self.a =
& Nbsp; self.b = b
& Nbsp; def testLess (self):
& Nbsp; self.assertLess (self.a, self.b)

Požadavky na :

  • Python

Podobný software

mock_helpers
mock_helpers

14 Apr 15

DoctorJ
DoctorJ

11 May 15

nose-json
nose-json

14 Apr 15

Komentáře k ParamUnittest

Komentáře nebyl nalezen
Přidat komentář
Zapnout obrázky!