~bzr-pqm/bzr/bzr.dev

« back to all changes in this revision

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

  • Committer: Canonical.com Patch Queue Manager
  • Date: 2010-11-08 13:45:51 UTC
  • mfrom: (5532.1.1 trunk)
  • Revision ID: pqm@pqm.ubuntu.com-20101108134551-sxvk77ehmegkrwmm
(vila) Fix news entry

Show diffs side-by-side

added added

removed removed

Lines of Context:
1
 
# Copyright (C) 2009, 2010, 2011 Canonical Ltd
 
1
# Copyright (C) 2009, 2010 Canonical Ltd
2
2
#
3
3
# This program is free software; you can redistribute it and/or modify
4
4
# it under the terms of the GNU General Public License as published by
33
33
    test_foreign,
34
34
    )
35
35
from bzrlib.tests.blackbox import test_push
36
 
from bzrlib.tests.scenarios import (
37
 
    load_tests_apply_scenarios,
38
 
    )
39
 
 
40
 
 
41
 
load_tests = load_tests_apply_scenarios
 
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
42
60
 
43
61
 
44
62
class TestDpush(tests.TestCaseWithTransport):
162
180
class TestDpushStrictWithChanges(TestDpushStrictMixin,
163
181
                                 test_push.TestPushStrictWithChanges):
164
182
 
165
 
    scenarios = test_push.strict_push_change_scenarios
166
 
 
167
183
    _changes_type = None # Set by load_tests
168
184
 
169
185
    def setUp(self):
172
188
 
173
189
    def test_push_with_revision(self):
174
190
        raise tests.TestNotApplicable('dpush does not handle --revision')
 
191