/brz/remove-bazaar

To get this branch, use:
bzr branch http://gegoxaren.bato24.eu/bzr/brz/remove-bazaar

« back to all changes in this revision

Viewing changes to bzrlib/tests/test_selftest.py

Merge up bzr.dev.

Show diffs side-by-side

added added

removed removed

Lines of Context:
65
65
                          iter_suite_tests,
66
66
                          preserve_input,
67
67
                          randomize_suite,
68
 
                          sort_suite_by_re,
69
68
                          split_suite_by_re,
70
69
                          test_lsprof,
71
70
                          test_suite,
502
501
        adapter = TreeTestProviderAdapter(server1, server2, formats)
503
502
        suite = adapter.adapt(input_test)
504
503
        tests = list(iter(suite))
505
 
        self.assertEqual(4, len(tests))
 
504
        # XXX We should not have tests fail as we add more scenarios
 
505
        # abentley 20080412
 
506
        self.assertEqual(5, len(tests))
506
507
        # this must match the default format setp up in
507
508
        # TreeTestProviderAdapter.adapt
508
509
        default_format = WorkingTreeFormat3
1822
1823
        # necessarily.)
1823
1824
        self.assertEqual(len(self.all_names), len(_test_ids(randomized_suite)))
1824
1825
 
1825
 
    def test_sort_suite_by_re(self):
1826
 
        sorted_suite = self.applyDeprecated(one_zero,
1827
 
            sort_suite_by_re, self.suite, 'test_filter_suite_by_r')
1828
 
        sorted_names = _test_ids(sorted_suite)
1829
 
        self.assertEqual(sorted_names[0], 'bzrlib.tests.test_selftest.'
1830
 
            'TestSelftestFiltering.test_filter_suite_by_re')
1831
 
        self.assertEquals(sorted(self.all_names), sorted(sorted_names))
1832
 
 
1833
1826
    def test_split_suit_by_re(self):
1834
1827
        self.all_names = _test_ids(self.suite)
1835
1828
        split_suite = split_suite_by_re(self.suite, 'test_filter_suite_by_r')
1987
1980
        # category
1988
1981
        test_list = [
1989
1982
            # testmod_names
 
1983
            'bzrlib.tests.blackbox.test_branch.TestBranch.test_branch',
1990
1984
            'bzrlib.tests.test_selftest.TestTestIdList.test_test_suite',
1991
1985
            # transport implementations
1992
1986
            'bzrlib.tests.test_transport_implementations.TransportTests'
1993
1987
            '.test_abspath(LocalURLServer)',
1994
 
            # packages_to_test()
1995
 
            'bzrlib.tests.blackbox.test_branch.TestBranch.test_branch',
1996
 
            # MODULES_TO_DOCTEST
 
1988
            # modules_to_doctest
1997
1989
            'bzrlib.timestamp.format_highres_date',
1998
1990
            # plugins can't be tested that way since selftest may be run with
1999
1991
            # --no-plugins