~ubuntu-branches/debian/stretch/bzr-xmloutput/stretch

« back to all changes in this revision

Viewing changes to tests/__init__.py

  • Committer: Bazaar Package Importer
  • Author(s): Jelmer Vernooij
  • Date: 2009-05-05 17:26:54 UTC
  • mfrom: (1.1.1 upstream)
  • Revision ID: james.westby@ubuntu.com-20090505172654-hh5w1j0cv1k8k5km
Tags: 0.8.3+bzr123-1
* Move to section vcs.
* Bump standards version to 3.8.1.
* New upstream snapshot.

Show diffs side-by-side

added added

removed removed

Lines of Context:
19
19
 
20
20
import sys
21
21
 
22
 
from bzrlib.tests import (
23
 
                          adapt_modules,
24
 
                          TestCaseWithTransport,
25
 
                          TestSuite,
26
 
                          TestLoader,
27
 
                          iter_suite_tests,
28
 
                          )
29
 
from bzrlib.symbol_versioning import (
30
 
    deprecated_method,
31
 
    zero_eighteen,
32
 
    )
33
 
import bzrlib.ui as ui
34
 
 
35
 
 
36
 
def test_suite():
 
22
 
 
23
from bzrlib import tests
 
24
 
 
25
 
 
26
def load_tests(basic_tests, module, loader):
37
27
    testmod_names = [
38
 
                     'test_version_xml',
39
 
                     'test_status_xml',
40
 
                     'test_log_xml',
41
 
                     'test_annotate_xml',
42
 
                     'test_info_xml',
43
 
                     'test_service',
44
 
                     ]
45
 
    
46
 
    loader = TestLoader()
47
 
#    suite = loader.loadTestsFromModuleNames(testmod_names) 
48
 
    suite = loader.loadTestsFromModuleNames(["%s.%s" % (__name__, i) for i in testmod_names])
49
 
 
50
 
    return suite
51
 
 
52
 
 
53
 
class ExternalBase(TestCaseWithTransport):
54
 
 
55
 
    @deprecated_method(zero_eighteen)
56
 
    def runbzr(self, args, retcode=0):
57
 
        if isinstance(args, basestring):
58
 
            args = args.split()
59
 
        return self.run_bzr(args, retcode=retcode)
60
 
 
61
 
    def check_output(self, output, *args):
62
 
        """Verify that the expected output matches what bzr says.
63
 
 
64
 
        The output is supplied first, so that you can supply a variable
65
 
        number of arguments to bzr.
66
 
        """
67
 
        self.assertEquals(self.run_bzr(*args)[0], output)
 
28
        'test_version_xml',
 
29
        'test_status_xml',
 
30
        'test_log_xml',
 
31
        'test_annotate_xml',
 
32
        'test_info_xml',
 
33
        'test_service',
 
34
        ]
 
35
    basic_tests.addTest(loader.loadTestsFromModuleNames(
 
36
            ["%s.%s" % (__name__, tmn) for tmn in testmod_names]))
 
37
    return basic_tests