¡@

Home 

python Programming Glossary: testprereqs

Python unittest: Generate multiple tests programmatically? [duplicate]

http://stackoverflow.com/questions/2798956/python-unittest-generate-multiple-tests-programmatically

every single input output pair into a single test class TestPreReqs unittest.TestCase def setUp self self.expected_pairs 23 55 4.. in setUp UPDATE Trying doublep 's advice class TestPreReqs unittest.TestCase def setUp self expected_pairs 2 3 42 11.. 11 3 None 31 99 for k pair in expected_pairs setattr TestPreReqs 'test_expected_ d' k create_test pair def create_test pair def..