~bzr-pqm/bzr/bzr.dev

« back to all changes in this revision

Viewing changes to bzrlib/tests/__init__.py

  • Committer: Robert Collins
  • Date: 2007-10-17 09:39:41 UTC
  • mfrom: (2911 +trunk)
  • mto: This revision was merged to the branch mainline in revision 2933.
  • Revision ID: robertc@robertcollins.net-20071017093941-v7d1djrt2617citb
Merge bzr.dev.

Show diffs side-by-side

added added

removed removed

Lines of Context:
2545
2545
    return suite
2546
2546
 
2547
2547
 
 
2548
def multiply_scenarios(scenarios_left, scenarios_right):
 
2549
    """Multiply two sets of scenarios.
 
2550
 
 
2551
    :returns: the cartesian product of the two sets of scenarios, that is
 
2552
        a scenario for every possible combination of a left scenario and a
 
2553
        right scenario.
 
2554
    """
 
2555
    return [
 
2556
        ('%s,%s' % (left_name, right_name),
 
2557
         dict(left_dict.items() + right_dict.items()))
 
2558
        for left_name, left_dict in scenarios_left
 
2559
        for right_name, right_dict in scenarios_right]
 
2560
 
 
2561
 
 
2562
 
2548
2563
def adapt_modules(mods_list, adapter, loader, suite):
2549
2564
    """Adapt the modules in mods_list using adapter and add to suite."""
2550
2565
    for test in iter_suite_tests(loader.loadTestsFromModuleNames(mods_list)):