1 | # -*- coding: utf-8 -*- |
---|
2 | # |
---|
3 | # Copyright (C) 2005-2007 Christopher Lenz <cmlenz@gmx.de> |
---|
4 | # Copyright (C) 2007-2010 Edgewall Software |
---|
5 | # All rights reserved. |
---|
6 | # |
---|
7 | # This software is licensed as described in the file COPYING, which |
---|
8 | # you should have received as part of this distribution. The terms |
---|
9 | # are also available at http://bitten.edgewall.org/wiki/License. |
---|
10 | |
---|
11 | import unittest |
---|
12 | |
---|
13 | try: |
---|
14 | import trac |
---|
15 | has_trac = True |
---|
16 | except ImportError: |
---|
17 | print "\nTrac not installed -- Skipping master tests\n" |
---|
18 | has_trac = False |
---|
19 | |
---|
20 | def master_suite(): |
---|
21 | from bitten.tests import admin, master, model, queue, web_ui, notify, \ |
---|
22 | upgrades |
---|
23 | from bitten.report import tests as report |
---|
24 | suite = unittest.TestSuite() |
---|
25 | suite.addTest(admin.suite()) |
---|
26 | suite.addTest(master.suite()) |
---|
27 | suite.addTest(model.suite()) |
---|
28 | suite.addTest(queue.suite()) |
---|
29 | suite.addTest(web_ui.suite()) |
---|
30 | suite.addTest(report.suite()) |
---|
31 | suite.addTest(notify.suite()) |
---|
32 | suite.addTest(upgrades.suite()) |
---|
33 | return suite |
---|
34 | |
---|
35 | def suite(): |
---|
36 | suite = unittest.TestSuite() |
---|
37 | if has_trac: |
---|
38 | suite.addTest(master_suite()) |
---|
39 | import bitten.tests_slave |
---|
40 | suite.addTest(bitten.tests_slave.suite()) |
---|
41 | return suite |
---|
42 | |
---|
43 | if __name__ == '__main__': |
---|
44 | unittest.main(defaultTest='suite') |
---|