File: tests.py

package info (click to toggle)
python-django 1.2.3-3%2Bsqueeze10
  • links: PTS, VCS
  • area: main
  • in suites: squeeze
  • size: 29,064 kB
  • ctags: 20,458
  • sloc: python: 101,293; xml: 574; makefile: 149; sh: 121; sql: 7
file content (20 lines) | stat: -rw-r--r-- 465 bytes parent folder | download | duplicates (2)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
# 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")