/brz/remove-bazaar

To get this branch, use:
bzr branch http://gegoxaren.bato24.eu/bzr/brz/remove-bazaar

« back to all changes in this revision

Viewing changes to bzrlib/tests/test_inv.py

  • Committer: John Arbash Meinel
  • Date: 2011-01-10 22:20:12 UTC
  • mfrom: (5582 +trunk)
  • mto: This revision was merged to the branch mainline in revision 5599.
  • Revision ID: john@arbash-meinel.com-20110110222012-mtcqudkvmzwiufuc
Merge in the bzr.dev 5582

Show diffs side-by-side

added added

removed removed

Lines of Context:
1
 
# Copyright (C) 2005-2010 Canonical Ltd
 
1
# Copyright (C) 2005-2011 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
32
32
    TestCaseWithTransport,
33
33
    condition_isinstance,
34
34
    multiply_tests,
35
 
    split_suite_by_condition,
36
35
    )
37
36
from bzrlib.tests.per_workingtree import workingtree_formats
38
 
 
39
 
 
40
 
def load_tests(standard_tests, module, loader):
41
 
    """Parameterise some inventory tests."""
42
 
    to_adapt, result = split_suite_by_condition(standard_tests,
43
 
        condition_isinstance(TestDeltaApplication))
 
37
from bzrlib.tests.scenarios import load_tests_apply_scenarios
 
38
 
 
39
 
 
40
load_tests = load_tests_apply_scenarios
 
41
 
 
42
 
 
43
def delta_application_scenarios():
44
44
    scenarios = [
45
45
        ('Inventory', {'apply_delta':apply_inventory_Inventory}),
46
46
        ]
63
63
            (str(format.__class__.__name__) + ".apply_inventory_delta", {
64
64
            'apply_delta':apply_inventory_WT,
65
65
            'format':format}))
66
 
    return multiply_tests(to_adapt, scenarios, result)
 
66
    return scenarios
67
67
 
68
68
 
69
69
def create_texts_for_inv(repo, inv):
73
73
        else:
74
74
            lines = []
75
75
        repo.texts.add_lines((ie.file_id, ie.revision), [], lines)
 
76
 
76
77
    
77
78
def apply_inventory_Inventory(self, basis, delta):
78
79
    """Apply delta to basis and return the result.
329
330
 
330
331
 
331
332
class TestDeltaApplication(TestCaseWithTransport):
 
333
 
 
334
    scenarios = delta_application_scenarios()
332
335
 
333
336
    def get_empty_inventory(self, reference_inv=None):
334
337
        """Get an empty inventory.