Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #! /usr/bin/env python
- """
- """
- import unittest
- class FooTest(unittest.TestCase):
- """ Sample test case """
- # preparing the test
- def setUp(self):
- """ Setting up for the test """
- print "FooTest:setUp_:begin"
- testName = self.shortDescription()
- if (testName == "Test routine A"):
- print "setting up for test A"
- elif (testName == "Test routine B"):
- print "setting up for test B"
- else:
- print "UNKNOWN TEST ROUTINE"
- print "FooTest:setUp_:end"
- # ending the test
- def tearDown(self):
- """ Cleaning up after the test """
- print "FooTest:tearDown_:begin"
- testName = self.shortDescription()
- if (testName == "Test routine A"):
- print "cleaning up after test A"
- elif (testName == "Test routine B"):
- print "cleaning up after test B"
- else:
- print "UNKNOWN TEST ROUTINE"
- print "FooTest:tearDown_:end"
- # test routine A
- def testA(self):
- """ Test routine A """
- print "FooTest:testA"
- # test routine B
- def testB(self):
- """ Test routine B """
- print "FooTest:testB"
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement