~bzr-pqm/bzr/bzr.dev

« 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_condition,
70
69
                          split_suite_by_re,
71
70
                          test_lsprof,
503
502
        adapter = TreeTestProviderAdapter(server1, server2, formats)
504
503
        suite = adapter.adapt(input_test)
505
504
        tests = list(iter(suite))
506
 
        self.assertEqual(4, len(tests))
 
505
        # XXX We should not have tests fail as we add more scenarios
 
506
        # abentley 20080412
 
507
        self.assertEqual(5, len(tests))
507
508
        # this must match the default format setp up in
508
509
        # TreeTestProviderAdapter.adapt
509
510
        default_format = WorkingTreeFormat3
1823
1824
        # necessarily.)
1824
1825
        self.assertEqual(len(self.all_names), len(_test_ids(randomized_suite)))
1825
1826
 
1826
 
    def test_sort_suite_by_re(self):
1827
 
        sorted_suite = self.applyDeprecated(one_zero,
1828
 
            sort_suite_by_re, self.suite, 'test_filter_suite_by_r')
1829
 
        sorted_names = _test_ids(sorted_suite)
1830
 
        self.assertEqual(sorted_names[0], 'bzrlib.tests.test_selftest.'
1831
 
            'TestSelftestFiltering.test_filter_suite_by_re')
1832
 
        self.assertEquals(sorted(self.all_names), sorted(sorted_names))
1833
 
 
1834
1827
    def test_split_suit_by_condition(self):
1835
1828
        self.all_names = _test_ids(self.suite)
1836
1829
        condition = condition_id_re('test_filter_suite_by_r')
2000
1993
        # category
2001
1994
        test_list = [
2002
1995
            # testmod_names
 
1996
            'bzrlib.tests.blackbox.test_branch.TestBranch.test_branch',
2003
1997
            'bzrlib.tests.test_selftest.TestTestIdList.test_test_suite',
2004
1998
            # transport implementations
2005
1999
            'bzrlib.tests.test_transport_implementations.TransportTests'
2006
2000
            '.test_abspath(LocalURLServer)',
2007
 
            # packages_to_test()
2008
 
            'bzrlib.tests.blackbox.test_branch.TestBranch.test_branch',
2009
 
            # MODULES_TO_DOCTEST
 
2001
            # modules_to_doctest
2010
2002
            'bzrlib.timestamp.format_highres_date',
2011
2003
            # plugins can't be tested that way since selftest may be run with
2012
2004
            # --no-plugins