~bzr-pqm/bzr/bzr.dev

« back to all changes in this revision

Viewing changes to bzrlib/tests/test_dirstate.py

  • Committer: Canonical.com Patch Queue Manager
  • Date: 2010-12-10 00:12:42 UTC
  • mfrom: (5559.2.2 test-scenarios)
  • Revision ID: pqm@pqm.ubuntu.com-20101210001242-kc09e5hy8yfoaelj
(mbp) change ad-hoc test loading to load_tests_apply_scenarios (Martin Pool)

Show diffs side-by-side

added added

removed removed

Lines of Context:
29
29
    tests,
30
30
    )
31
31
from bzrlib.tests import test_osutils
 
32
from bzrlib.tests.scenarios import load_tests_apply_scenarios
32
33
 
33
34
 
34
35
# TODO:
44
45
# set_path_id  setting id when state is in memory modified
45
46
 
46
47
 
47
 
def load_tests(basic_tests, module, loader):
48
 
    suite = loader.suiteClass()
49
 
    dir_reader_tests, remaining_tests = tests.split_suite_by_condition(
50
 
        basic_tests, tests.condition_isinstance(TestCaseWithDirState))
51
 
    tests.multiply_tests(dir_reader_tests,
52
 
                         test_osutils.dir_reader_scenarios(), suite)
53
 
    suite.addTest(remaining_tests)
54
 
    return suite
 
48
load_tests = load_tests_apply_scenarios
55
49
 
56
50
 
57
51
class TestCaseWithDirState(tests.TestCaseWithTransport):
58
52
    """Helper functions for creating DirState objects with various content."""
59
53
 
 
54
    scenarios = test_osutils.dir_reader_scenarios()
 
55
 
60
56
    # Set by load_tests
61
57
    _dir_reader_class = None
62
58
    _native_to_unicode = None # Not used yet