parts/django/tests/modeltests/test_client/tests.py
author Nishanth Amuluru <nishanth@fossee.in>
Sun, 09 Jan 2011 20:26:11 +0530
changeset 368 a4fa11b2cb5c
parent 307 c6bca38c1cbf
permissions -rw-r--r--
add textbook works fine

# Validate that you can override the default test suite

import unittest

def suite():
    """
    Define a suite that deliberately ignores a test defined in
    this module.
    """
    
    testSuite = unittest.TestSuite()
    testSuite.addTest(SampleTests('testGoodStuff'))
    return testSuite
    
class SampleTests(unittest.TestCase):
    def testGoodStuff(self):
        pass
        
    def testBadStuff(self):
        self.fail("This test shouldn't run")