ParamUnittest

Software screenshot:
ParamUnittest
Dettagli del software:
Versione: 0.2
Data di caricamento: 20 Feb 15
Sviluppatore: Enrico Franchi
Licenza: Libero
Popolarità: 2

Rating: 5.0/5 (Total Votes: 1)

ParamUnittest è uno strumento Python progettato per consentire la creazione di test di unità parametrizzate in grado di lavorare con il pacchetto ufficiale unittest Python.
Esempi:
import unittest
import paramunittest
@ Paramunittest.parametrized (
& Nbsp; ('1', '2'),
& Nbsp; # (4, 3),
& Nbsp; ('2', '3'),
& Nbsp; (('4',), {'b': '5'}),
& Nbsp; ((), {'a': 5, 'b': 6}),
& Nbsp; {'a': 5, 'b': 6},
)
Classe TestFoo (paramunittest.ParametrizedTestCase):
& Nbsp; setParameters def (auto, a, b):
& Nbsp; self.a = 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; ((), {'a': 5, 'b': 6}),
& Nbsp; {'a': 5, 'b': 6},
)
Classe TestBar (unittest.TestCase):
& Nbsp; setParameters def (auto, a, b):
& Nbsp; self.a = a
& Nbsp; self.b = b
& Nbsp; def testless (self):
& Nbsp; self.assertLess (self.a, self.b)

Requisiti :

  • Python

Programmi simili

bdd
bdd

14 Apr 15

BDD4Django
BDD4Django

20 Feb 15

pytest-marks
pytest-marks

15 Apr 15

tl.testing
tl.testing

15 Apr 15

Commenti a ParamUnittest

I commenti non trovato
Aggiungi commento
Accendere le immagini!