~bzr-pqm/bzr/bzr.dev

« back to all changes in this revision

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

  • Committer: Andrew Bennetts
  • Date: 2010-10-08 04:25:10 UTC
  • mto: This revision was merged to the branch mainline in revision 5472.
  • Revision ID: andrew.bennetts@canonical.com-20101008042510-sg9vdhmnggilzxsk
Fix stray TAB in source.

Show diffs side-by-side

added added

removed removed

Lines of Context:
1
 
# Copyright (C) 2006-2011 Canonical Ltd
 
1
# Copyright (C) 2006-2010 Canonical Ltd
2
2
# Authors: Aaron Bentley
3
3
#
4
4
# This program is free software; you can redistribute it and/or modify
27
27
    )
28
28
from bzrlib.bundle import serializer
29
29
from bzrlib.transport import memory
30
 
from bzrlib.tests.scenarios import load_tests_apply_scenarios
31
 
 
32
 
 
33
 
load_tests = load_tests_apply_scenarios
 
30
 
 
31
 
 
32
def load_tests(standard_tests, module, loader):
 
33
    """Multiply tests for the send command."""
 
34
    result = loader.suiteClass()
 
35
 
 
36
    # one for each king of change
 
37
    changes_tests, remaining_tests = tests.split_suite_by_condition(
 
38
        standard_tests, tests.condition_isinstance((
 
39
                TestSendStrictWithChanges,
 
40
                )))
 
41
    changes_scenarios = [
 
42
        ('uncommitted',
 
43
         dict(_changes_type='_uncommitted_changes')),
 
44
        ('pending_merges',
 
45
         dict(_changes_type='_pending_merges')),
 
46
        ('out-of-sync-trees',
 
47
         dict(_changes_type='_out_of_sync_trees')),
 
48
        ]
 
49
    tests.multiply_tests(changes_tests, changes_scenarios, result)
 
50
    # No parametrization for the remaining tests
 
51
    result.addTests(remaining_tests)
 
52
 
 
53
    return result
34
54
 
35
55
 
36
56
class TestSendMixin(object):
348
368
class TestSendStrictWithChanges(tests.TestCaseWithTransport,
349
369
                                   TestSendStrictMixin):
350
370
 
351
 
    # These are textually the same as test_push.strict_push_change_scenarios,
352
 
    # but since the functions are reimplemented here, the definitions are left
353
 
    # here too.
354
 
    scenarios = [
355
 
        ('uncommitted',
356
 
         dict(_changes_type='_uncommitted_changes')),
357
 
        ('pending_merges',
358
 
         dict(_changes_type='_pending_merges')),
359
 
        ('out-of-sync-trees',
360
 
         dict(_changes_type='_out_of_sync_trees')),
361
 
        ]
362
 
 
363
371
    _changes_type = None # Set by load_tests
364
372
 
365
373
    def setUp(self):