/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/inventory_implementations/__init__.py

  • Committer: Robert Collins
  • Date: 2007-09-03 23:19:00 UTC
  • mfrom: (2791 +trunk)
  • mto: This revision was merged to the branch mainline in revision 2792.
  • Revision ID: robertc@robertcollins.net-20070903231900-j3or8vkiixxpskzm
Fix some inconsistent NEWS indents.

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
# Copyright (C) 2005, 2006, 2007 Canonical Ltd
 
2
#
 
3
# This program is free software; you can redistribute it and/or modify
 
4
# it under the terms of the GNU General Public License as published by
 
5
# the Free Software Foundation; either version 2 of the License, or
 
6
# (at your option) any later version.
 
7
#
 
8
# This program is distributed in the hope that it will be useful,
 
9
# but WITHOUT ANY WARRANTY; without even the implied warranty of
 
10
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
 
11
# GNU General Public License for more details.
 
12
#
 
13
# You should have received a copy of the GNU General Public License
 
14
# along with this program; if not, write to the Free Software
 
15
# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
 
16
 
 
17
"""Tests for different inventory implementations"""
 
18
 
 
19
# NOTE: Don't import Inventory here, to make sure that we don't accidentally
 
20
# hardcode that when we should be using self.make_inventory
 
21
 
 
22
from bzrlib import (
 
23
        errors,
 
24
        )
 
25
 
 
26
from bzrlib.inventory import (
 
27
        InventoryDirectory,
 
28
        InventoryEntry,
 
29
        InventoryFile,
 
30
        InventoryLink,
 
31
        ROOT_ID,
 
32
        TreeReference,
 
33
        )
 
34
 
 
35
from bzrlib.tests import (
 
36
        TestCase,
 
37
        multiply_tests_from_modules,
 
38
        )
 
39
 
 
40
 
 
41
def _inventory_test_scenarios():
 
42
    """Return a sequence of test scenarios.
 
43
 
 
44
    Each scenario is (scenario_name_suffix, params).  The params are each 
 
45
    set as attributes on the test case.
 
46
    """
 
47
    from bzrlib.inventory import (
 
48
        Inventory,
 
49
        )
 
50
    yield ('Inventory', dict(inventory_class=Inventory))
 
51
 
 
52
 
 
53
def test_suite():
 
54
    """Generate suite containing all parameterized tests"""
 
55
    modules_to_test = [
 
56
            'bzrlib.tests.inventory_implementations.basics',
 
57
            ]
 
58
    return multiply_tests_from_modules(modules_to_test,
 
59
            _inventory_test_scenarios())