ParamUnittest

Software Screenshot:
ParamUnittest
Software Details:
Version: 0.2
Upload Date: 20 Feb 15
Developer: Enrico Franchi
Distribution Type: Freeware
Downloads: 56

Rating: 2.3/5 (Total Votes: 3)

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)

Requirements:

  • Python

Similar Software

prego
prego

20 Feb 15

noselog
noselog

20 Feb 15

nose-bleed
nose-bleed

14 Apr 15

lava-fastmodels
lava-fastmodels

14 Apr 15

Comments to ParamUnittest

Comments not found
Add Comment
Turn on images!