~bzr-pqm/bzr/bzr.dev

« back to all changes in this revision

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

  • Committer: Jelmer Vernooij
  • Date: 2010-12-20 11:57:14 UTC
  • mto: This revision was merged to the branch mainline in revision 5577.
  • Revision ID: jelmer@samba.org-20101220115714-2ru3hfappjweeg7q
Don't use no-plugins.

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):
104
86
 
105
87
        script.run_script(self, '''
106
88
            $ bzr dpush -d dc d
 
89
            2>Pushed up to revision 2.
107
90
            $ bzr revno dc
108
91
            2
109
92
            $ bzr status dc
121
104
        self.build_tree_contents([("dc/foofile", "blaaaal")])
122
105
        script.run_script(self, '''
123
106
            $ bzr dpush -d dc d --no-strict
 
107
            2>Pushed up to revision 2.
124
108
            ''')
125
109
        self.assertFileEqual("blaaaal", "dc/foofile")
126
110
        # if the dummy vcs wasn't that dummy we could uncomment the line below
178
162
class TestDpushStrictWithChanges(TestDpushStrictMixin,
179
163
                                 test_push.TestPushStrictWithChanges):
180
164
 
 
165
    scenarios = test_push.strict_push_change_scenarios
 
166
 
181
167
    _changes_type = None # Set by load_tests
182
168
 
183
169
    def setUp(self):
186
172
 
187
173
    def test_push_with_revision(self):
188
174
        raise tests.TestNotApplicable('dpush does not handle --revision')
189