OLD | NEW |
1 # Test wrapper from Quod Libet | 1 # Test wrapper from Quod Libet |
2 # http://www.sacredchao.net/quodlibet/ | 2 # http://www.sacredchao.net/quodlibet/ |
3 # $Id: __init__.py 1527 2006-05-07 16:41:16Z mu $ | |
4 import unittest, sys | 3 import unittest, sys |
5 suites = [] | 4 suites = [] |
6 add = registerCase = suites.append | 5 add = registerCase = suites.append |
7 from unittest import TestCase | 6 from unittest import TestCase |
8 | 7 |
9 class Mock(object): | 8 class Mock(object): |
10 # A generic mocking object. | 9 # A generic mocking object. |
11 def __init__(self, **kwargs): self.__dict__.update(kwargs) | 10 def __init__(self, **kwargs): self.__dict__.update(kwargs) |
12 | 11 |
13 import test_intnum | 12 import test_intnum |
(...skipping 47 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
61 runner = Runner() | 60 runner = Runner() |
62 failures = False | 61 failures = False |
63 for test in suites: | 62 for test in suites: |
64 if not run or test.__name__ in run: | 63 if not run or test.__name__ in run: |
65 failures |= runner.run(test) | 64 failures |= runner.run(test) |
66 return failures | 65 return failures |
67 | 66 |
68 if __name__ == "__main__": | 67 if __name__ == "__main__": |
69 raise SystemExit(unit(sys.argv[1:])) | 68 raise SystemExit(unit(sys.argv[1:])) |
70 | 69 |
OLD | NEW |