Fixture
Alternative Name(s)
setUpPackage
setup, setUp, or setup_package
tearDownPackage
teardown, tearDown, or teardown_package
setUpModule
setup, setUp, or setup_module
tearDownModule
teardown, tearDown, or teardown_module
setUpClass
setupClass, setup_class, setupAll, or
setUpAll
tearDownClass
teardownClass, teardown_class,
teardownAll,or tearDownAll
setUp (class method fixtures)
setup
tearDown (class method fixtures)
teardown
assert_equals()
Until now, you have been using Python’s built-in keyword assert to check the actual
results against expected values. nose has its own assert_equals() method for this. The
code in Listing
4-7
demonstrates the use of assert_equals() and assert.
Chapter 4
■
nose and nose2
76
Do'stlaringiz bilan baham: |