~bzr-pqm/bzr/bzr.dev

« back to all changes in this revision

Viewing changes to bzrlib/tests/test_selftest.py

  • Committer: Canonical.com Patch Queue Manager
  • Date: 2010-04-22 15:44:21 UTC
  • mfrom: (5171.1.2 integration)
  • Revision ID: pqm@pqm.ubuntu.com-20100422154421-eeit8sxsvtxxherb
(vila) Merge 2.2 into bzr.dev

Show diffs side-by-side

added added

removed removed

Lines of Context:
2773
2773
        # Test that a plausible list of modules to doctest is returned
2774
2774
        # by _test_suite_modules_to_doctest.
2775
2775
        test_list = tests._test_suite_modules_to_doctest()
2776
 
        if __doc__ is None:
2777
 
            # When docstrings are stripped, there are no modules to doctest
2778
 
            self.assertEqual([], test_list)
2779
 
            return
2780
2776
        self.assertSubset([
2781
2777
            'bzrlib.timestamp',
2782
2778
            ],
2799
2795
        self.overrideAttr(tests, '_test_suite_testmod_names', testmod_names)
2800
2796
        def doctests():
2801
2797
            calls.append("modules_to_doctest")
2802
 
            if __doc__ is None:
2803
 
                return []
2804
2798
            return ['bzrlib.timestamp']
2805
2799
        self.overrideAttr(tests, '_test_suite_modules_to_doctest', doctests)
2806
2800
        expected_test_list = [
2809
2803
            ('bzrlib.tests.per_transport.TransportTests'
2810
2804
             '.test_abspath(LocalTransport,LocalURLServer)'),
2811
2805
            'bzrlib.tests.test_selftest.TestTestSuite.test_test_suite',
 
2806
            # modules_to_doctest
 
2807
            'bzrlib.timestamp.format_highres_date',
2812
2808
            # plugins can't be tested that way since selftest may be run with
2813
2809
            # --no-plugins
2814
2810
            ]
2815
 
        if __doc__ is not None:
2816
 
            expected_test_list.extend([
2817
 
                # modules_to_doctest
2818
 
                'bzrlib.timestamp.format_highres_date',
2819
 
                ])
2820
2811
        suite = tests.test_suite()
2821
2812
        self.assertEqual(set(["testmod_names", "modules_to_doctest"]),
2822
2813
            set(calls))