~bzr-pqm/bzr/bzr.dev

« back to all changes in this revision

Viewing changes to bzrlib/tests/blackbox/test_dpush.py

  • Committer: Martin Pool
  • Date: 2010-12-09 04:26:53 UTC
  • mto: This revision was merged to the branch mainline in revision 5564.
  • Revision ID: mbp@canonical.com-20101209042653-hgy6vkrlfvi1d7rs
Change to using standard load_tests_apply_scenarios.

Show diffs side-by-side

added added

removed removed

Lines of Context:
33
33
    test_foreign,
34
34
    )
35
35
from bzrlib.tests.blackbox import test_push
36
 
 
37
 
 
38
 
def load_tests(standard_tests, module, loader):
39
 
    """Multiply tests for the dpush command."""
40
 
    result = loader.suiteClass()
41
 
 
42
 
    # one for each king of change
43
 
    changes_tests, remaining_tests = tests.split_suite_by_condition(
44
 
        standard_tests, tests.condition_isinstance((
45
 
                TestDpushStrictWithChanges,
46
 
                )))
47
 
    changes_scenarios = [
48
 
        ('uncommitted',
49
 
         dict(_changes_type= '_uncommitted_changes')),
50
 
        ('pending-merges',
51
 
         dict(_changes_type= '_pending_merges')),
52
 
        ('out-of-sync-trees',
53
 
         dict(_changes_type= '_out_of_sync_trees')),
54
 
        ]
55
 
    tests.multiply_tests(changes_tests, changes_scenarios, result)
56
 
    # No parametrization for the remaining tests
57
 
    result.addTests(remaining_tests)
58
 
 
59
 
    return result
 
36
from bzrlib.tests.scenarios import (
 
37
    load_tests_apply_scenarios,
 
38
    )
 
39
 
 
40
 
 
41
load_tests = load_tests_apply_scenarios
60
42
 
61
43
 
62
44
class TestDpush(tests.TestCaseWithTransport):
180
162
class TestDpushStrictWithChanges(TestDpushStrictMixin,
181
163
                                 test_push.TestPushStrictWithChanges):
182
164
 
 
165
    scenarios = test_push.strict_push_change_scenarios
 
166
 
183
167
    _changes_type = None # Set by load_tests
184
168
 
185
169
    def setUp(self):
188
172
 
189
173
    def test_push_with_revision(self):
190
174
        raise tests.TestNotApplicable('dpush does not handle --revision')
191