ParamUnittest 0.2

Simple extension to have parametrized unit tests
ParamUnittest is a Python tool designed to allow the creation of parametrized unit tests capable of working with the official unittest Python package.

Examples:

import unittest
import paramunittest

@paramunittest.parametrized(
 ('1', '2'),
 #(4, 3),
 ('2', '3'),
 (('4', ), {'b': '5'}),
 ((), {'a': 5, 'b': 6}),
 {'a': 5, 'b': 6},
)
class TestFoo(paramunittest.ParametrizedTestCase):
 def setParameters(self, a, b):
 self.a = a
 self.b = b

 def testLess(self):
 self.assertLess(self.a, self.b)

@paramunittest.parametrized(
 ('1', '2'),
 #(4, 3),
 ('2', '3'),
 (('4', ), {'b': '5'}),
 ((), {'a': 5, 'b': 6}),
 {'a': 5, 'b': 6},
)
class TestBar(unittest.TestCase):
 def setParameters(self, a, b):
 self.a = a
 self.b = b

 def testLess(self):
 self.assertLess(self.a, self.b)

last updated on:
September 23rd, 2012, 18:41 GMT
price:
FREE!
developed by:
Enrico Franchi
homepage:
github.com
license type:
BSD License 
category:
ROOT \ Programming \ Quality Assurance and Testing

FREE!

In a hurry? Add it to your Download Basket!

user rating

UNRATED
0.0/5
 

0/5

Rate it!

Add your review!

SUBMIT