/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/__init__.py

Merge bzr.dev

Show diffs side-by-side

added added

removed removed

Lines of Context:
1235
1235
            'EMAIL': None,
1236
1236
            'BZR_PROGRESS_BAR': None,
1237
1237
            'BZR_LOG': None,
 
1238
            'BZR_PLUGIN_PATH': None,
1238
1239
            # SSH Agent
1239
1240
            'SSH_AUTH_SOCK': None,
1240
1241
            # Proxies
1354
1355
        """
1355
1356
        # flush the log file, to get all content
1356
1357
        import bzrlib.trace
1357
 
        bzrlib.trace._trace_file.flush()
 
1358
        if bzrlib.trace._trace_file:
 
1359
            bzrlib.trace._trace_file.flush()
1358
1360
        if self._log_contents:
1359
1361
            # XXX: this can hardly contain the content flushed above --vila
1360
1362
            # 20080128
2865
2867
                   'bzrlib.tests.test_selftest',
2866
2868
                   'bzrlib.tests.test_setup',
2867
2869
                   'bzrlib.tests.test_sftp_transport',
 
2870
                   'bzrlib.tests.test_shelf',
 
2871
                   'bzrlib.tests.test_shelf_ui',
2868
2872
                   'bzrlib.tests.test_smart',
2869
2873
                   'bzrlib.tests.test_smart_add',
2870
2874
                   'bzrlib.tests.test_smart_transport',
2950
2954
 
2951
2955
    modules_to_doctest = [
2952
2956
        'bzrlib',
2953
 
        'bzrlib.errors',
 
2957
        'bzrlib.branchbuilder',
2954
2958
        'bzrlib.export',
2955
2959
        'bzrlib.inventory',
2956
2960
        'bzrlib.iterablefile',
2957
2961
        'bzrlib.lockdir',
2958
2962
        'bzrlib.merge3',
2959
2963
        'bzrlib.option',
2960
 
        'bzrlib.store',
2961
2964
        'bzrlib.symbol_versioning',
2962
2965
        'bzrlib.tests',
2963
2966
        'bzrlib.timestamp',
2969
2972
            # No tests to keep here, move along
2970
2973
            continue
2971
2974
        try:
2972
 
            doc_suite = doctest.DocTestSuite(mod)
 
2975
            # note that this really does mean "report only" -- doctest 
 
2976
            # still runs the rest of the examples
 
2977
            doc_suite = doctest.DocTestSuite(mod,
 
2978
                optionflags=doctest.REPORT_ONLY_FIRST_FAILURE)
2973
2979
        except ValueError, e:
2974
2980
            print '**failed to get doctest for: %s\n%s' % (mod, e)
2975
2981
            raise
 
2982
        if len(doc_suite._tests) == 0:
 
2983
            raise errors.BzrError("no doctests found in %s" % (mod,))
2976
2984
        suite.addTest(doc_suite)
2977
2985
 
2978
2986
    default_encoding = sys.getdefaultencoding()