heat/heat/tests/examples/test3.py
Jeff Peeler 2f8e95baec Add unit test framework nose and associated helper scripts
For usage documentation, refer to heat/tests/testing-overview.txt.
run_tests.sh is what runs the tests.

Fixes #44

Signed-off-by: Jeff Peeler <jpeeler@redhat.com>
2012-04-13 17:10:30 -04:00

26 lines
584 B
Python

###
### the standard unittest-derived test
### http://darcs.idyll.org/~t/projects/nose-demo/simple/tests/test_stuff.py.html
###
import sys
import nose
import unittest
from nose.plugins.attrib import attr
# sets attribute on all test methods
@attr(tag=['example', 'unittest'])
@attr(speed='fast')
class ExampleTest(unittest.TestCase):
def test_a(self):
self.assert_(1 == 1)
def setUp(self):
print "test3 setup complete"
def tearDown(self):
print "test3 teardown complete"
if __name__ == '__main__':
sys.argv.append(__file__)
nose.main()