Python unittest: setUpClass(), tearDownClass(), setUpModule() and tearDownModule() are not called
<p>With the <code>unittest</code> module using python 2.6.6, how to invoke code after all tests have run ?</p>

<p>Please considere the following MCVE:</p>

<pre><code>#!/bin/env python
import unittest

def setUpModule():
    print 'setUpModule'

def tearDownModule():
    print 'tearDownModule'

class TestClass(unittest.TestCase):
    @classmethod
    def setUpClass(cls):
        print 'setUpClass'

    @classmethod
    def tearDownClass(cls):
        print 'tearDownClass'

    def test_trivia(self):
        self.assertTrue(True)

def main():
    """entry point"""
    unittest.main()

if __name__ == '__main__':
    main()
</code></pre>

<p>I would expect to see <code>tearDownClass</code> and <code>tearDownModule</code> to appear on the console, but it does not:</p>

<pre><code>$ ./test.py 
.
----------------------------------------------------------------------
Ran 1 test in 0.000s

OK
$
</code></pre>

<p>What am I doing wrong?</p>