/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

  • Committer: John Arbash Meinel
  • Date: 2010-04-22 19:05:14 UTC
  • mfrom: (4634.139.10 2.0.6-peak-commit-mem)
  • mto: This revision was merged to the branch mainline in revision 5175.
  • Revision ID: john@arbash-meinel.com-20100422190514-udvjsm6n2a6sh0jv
Bring into bzr.dev, and update NEWS.

I can't land in 2.0 right now because PQM is broken.
But at least I can land in trunk.

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))