~brz/brz-debian/byoci

« back to all changes in this revision

Viewing changes to tests/__init__.py

  • Committer: James Westby
  • Date: 2007-02-27 20:14:25 UTC
  • mto: (104.1.5 unstable)
  • mto: This revision was merged to the branch mainline in revision 101.
  • Revision ID: jw+debian@jameswestby.net-20070227201425-vuyx5kr9j4mbe9qb
Add the start of a test suite.

  * Add the framework for a testsuite.
  * Add tests for the default builder.

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
#    __init__.py -- Testsuite for builddeb
 
2
#    Copyright (C) 2007 James Westby <jw+debian@jameswestby.net>
 
3
#    
 
4
#    This file is part of bzr-builddeb.
 
5
#
 
6
#    bzr-builddeb is free software; you can redistribute it and/or modify
 
7
#    it under the terms of the GNU General Public License as published by
 
8
#    the Free Software Foundation; either version 2 of the License, or
 
9
#    (at your option) any later version.
 
10
#
 
11
#    bzr-builddeb is distributed in the hope that it will be useful,
 
12
#    but WITHOUT ANY WARRANTY; without even the implied warranty of
 
13
#    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
 
14
#    GNU General Public License for more details.
 
15
#
 
16
#    You should have received a copy of the GNU General Public License
 
17
#    along with bzr-builddeb; if not, write to the Free Software
 
18
#    Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA  02110-1301  USA
 
19
#
 
20
 
 
21
from unittest import TestSuite
 
22
 
 
23
from bzrlib.tests import TestUtil
 
24
 
 
25
def test_suite():
 
26
    loader = TestUtil.TestLoader()
 
27
    suite = TestSuite()
 
28
    testmod_names = [
 
29
            'test_builder',
 
30
            ]
 
31
    print __name__
 
32
    suite.addTest(loader.loadTestsFromModuleNames(["%s.%s" % (__name__, i) for i in testmod_names]))
 
33
 
 
34
    return suite
 
35