Skip to content

Instantly share code, notes, and snippets.

@pellepim
Created February 11, 2012 10:20
Show Gist options
  • Save pellepim/1798556 to your computer and use it in GitHub Desktop.
Save pellepim/1798556 to your computer and use it in GitHub Desktop.
test_layout
class EnterpriseModule_tests(Enterprise_tests):
def setUp(self):
self.setUpEnterprise()
def test_ClassInModule(self):
""" Tests everything about the ClassInModule class """
def _test_function_1():
""" Tests the first function in the ClassInModule """
doSomething()
self.assertSomething()
def _test_function_2():
""" Tests the second function in the ClassInModule """
doSomething()
self.assertSomething()
def _test_function_3():
""" Tests the third function in the ClassInModule """
doSomething()
self.assertSomething()
self.runNestedTests(locals())
def test_AnotherClassInModule(self):
""" Tests everything about the AnotherClassInModule class"""
def _test_function_1():
""" Tests the first function in the AnotherClassInModule """
doSomething()
self.assertSomething()
def _test_function_2():
""" Tests the second function in the AnotherClassInModule """
doSomething()
self.assertSomething()
self.runNestedTests(locals())
class Enterprise_tests(pp_unittesting.PPTestCase):
def runNestedTests(self, test_function_locals):
for key, value in test_function_locals.iteritems():
if key.startswith("_test_"):
value();
def setUpEnterprise(self, test_function_locals):
doShitLoadsOfStuffToSetUpAnEnterprise()
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment