changeset 307 | c6bca38c1cbf |
306:5ff1fc726848 | 307:c6bca38c1cbf |
---|---|
1 # Validate that you can override the default test suite |
|
2 |
|
3 import unittest |
|
4 |
|
5 def suite(): |
|
6 """ |
|
7 Define a suite that deliberately ignores a test defined in |
|
8 this module. |
|
9 """ |
|
10 |
|
11 testSuite = unittest.TestSuite() |
|
12 testSuite.addTest(SampleTests('testGoodStuff')) |
|
13 return testSuite |
|
14 |
|
15 class SampleTests(unittest.TestCase): |
|
16 def testGoodStuff(self): |
|
17 pass |
|
18 |
|
19 def testBadStuff(self): |
|
20 self.fail("This test shouldn't run") |