~bzr-pqm/bzr/bzr.dev

« back to all changes in this revision

Viewing changes to bzrlib/tests/__init__.py

  • Committer: Andrew Bennetts
  • Date: 2009-08-25 01:25:57 UTC
  • mfrom: (4642 +trunk)
  • mto: This revision was merged to the branch mainline in revision 4657.
  • Revision ID: andrew.bennetts@canonical.com-20090825012557-1ku5o09nv3ra9n12
Merge from bzr.dev.

Show diffs side-by-side

added added

removed removed

Lines of Context:
3207
3207
             starting_with=None,
3208
3208
             runner_class=None,
3209
3209
             suite_decorators=None,
 
3210
             stream=None,
3210
3211
             ):
3211
3212
    """Run the whole test suite under the enhanced runner"""
3212
3213
    # XXX: Very ugly way to do this...
3230
3231
        else:
3231
3232
            keep_only = load_test_id_list(load_list)
3232
3233
        if test_suite_factory is None:
 
3234
            # Reduce loading time by loading modules based on the starting_with
 
3235
            # patterns.
3233
3236
            suite = test_suite(keep_only, starting_with)
3234
3237
        else:
3235
3238
            suite = test_suite_factory()
 
3239
        if starting_with:
 
3240
            # But always filter as requested.
 
3241
            suite = filter_suite_by_id_startswith(suite, starting_with)
3236
3242
        return run_suite(suite, 'testbzr', verbose=verbose, pattern=pattern,
3237
3243
                     stop_on_failure=stop_on_failure,
3238
3244
                     transport=transport,
3245
3251
                     strict=strict,
3246
3252
                     runner_class=runner_class,
3247
3253
                     suite_decorators=suite_decorators,
 
3254
                     stream=stream,
3248
3255
                     )
3249
3256
    finally:
3250
3257
        default_transport = old_transport
3683
3690
            reload(sys)
3684
3691
            sys.setdefaultencoding(default_encoding)
3685
3692
 
3686
 
    if starting_with:
3687
 
        suite = filter_suite_by_id_startswith(suite, starting_with)
3688
 
 
3689
3693
    if keep_only is not None:
3690
3694
        # Now that the referred modules have loaded their tests, keep only the
3691
3695
        # requested ones.