~ubuntu-branches/debian/squeeze/bzr/squeeze-201308041037

« back to all changes in this revision

Viewing changes to bzrlib/tests/per_repository_reference/__init__.py

  • Committer: Bazaar Package Importer
  • Author(s): Jelmer Vernooij
  • Date: 2010-05-27 21:58:49 UTC
  • mfrom: (1.4.7 upstream)
  • Revision ID: james.westby@ubuntu.com-20100527215849-61ojb51ih9zn31ov
Tags: 2.1.2-1
New upstream release.

Show diffs side-by-side

added added

removed removed

Lines of Context:
23
23
"""
24
24
 
25
25
from bzrlib import (
 
26
    errors,
26
27
    repository,
27
28
    remote,
28
29
    )
66
67
            self.repository_format.__class__)
67
68
 
68
69
 
 
70
class TestIncompatibleStacking(TestCaseWithRepository):
 
71
 
 
72
    def test_add_fallback_repository_rejects_incompatible(self):
 
73
        # Repository.add_fallback_repository raises IncompatibleRepositories if
 
74
        # you take two repositories in different serializations and try to
 
75
        # stack them.
 
76
        if self.make_repository('test')._format.supports_chks:
 
77
            different_fmt = '1.9'
 
78
        else:
 
79
            different_fmt = '2a'
 
80
        repo = self.make_repository('repo', format=different_fmt)
 
81
        referring = self.make_repository('referring')
 
82
        self.assertRaises(errors.IncompatibleRepositories,
 
83
                referring.add_fallback_repository, repo)
 
84
 
 
85
 
69
86
def external_reference_test_scenarios():
70
87
    """Generate test scenarios for repositories supporting external references.
71
88
    """