/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 breezy/tests/blackbox/test_exceptions.py

  • Committer: Jelmer Vernooij
  • Date: 2017-05-21 19:09:26 UTC
  • mfrom: (6622.1.36 breezy)
  • Revision ID: jelmer@jelmer.uk-20170521190926-5vtz8xaf0e9ylrpc
Merge rename to breezy.

Show diffs side-by-side

added added

removed removed

Lines of Context:
19
19
import os
20
20
import re
21
21
 
22
 
from bzrlib import (
 
22
from breezy import (
23
23
    bzrdir,
24
24
    config,
25
25
    controldir,
28
28
    repository,
29
29
    tests,
30
30
    )
31
 
from bzrlib.repofmt.groupcompress_repo import RepositoryFormat2a
 
31
from breezy.repofmt.groupcompress_repo import RepositoryFormat2a
32
32
 
33
33
 
34
34
class TestExceptionReporting(tests.TestCaseInTempDir):
56
56
            env_changes={"LANG": "C", "LC_ALL": "C"},
57
57
            universal_newlines=True,
58
58
            retcode=errors.EXIT_ERROR)
59
 
        self.assertContainsRe(err, r"^bzr: ERROR: .*'\\xa0'.* unsupported",
 
59
        self.assertContainsRe(err, r"^brz: ERROR: .*'\\xa0'.* unsupported",
60
60
            flags=re.MULTILINE)
61
61
        self.assertEqual(out, "")
62
62
 
63
63
    def test_utf8_default_fs_enc(self):
64
 
        """In the C locale bzr treats a posix filesystem as UTF-8 encoded"""
 
64
        """In the C locale brz treats a posix filesystem as UTF-8 encoded"""
65
65
        if os.name != "posix":
66
66
            raise tests.TestNotApplicable("Needs system beholden to C locales")
67
67
        out, err = self.run_bzr_subprocess(["init", "file:%C2%A7"],
91
91
class TestDeprecationWarning(tests.TestCaseWithTransport):
92
92
    """The deprecation warning is controlled via a global variable:
93
93
    repository._deprecation_warning_done. As such, it can be emitted only once
94
 
    during a bzr invocation, no matter how many repositories are involved.
 
94
    during a brz invocation, no matter how many repositories are involved.
95
95
 
96
96
    It would be better if it was a repo attribute instead but that's far more
97
97
    work than I want to do right now -- vila 20091215.
104
104
        repository.format_registry.register(TestObsoleteRepoFormat)
105
105
        self.addCleanup(controldir.format_registry.remove, "testobsolete")
106
106
        bzrdir.register_metadir(controldir.format_registry, "testobsolete",
107
 
            "bzrlib.tests.blackbox.test_exceptions.TestObsoleteRepoFormat",
108
 
            branch_format='bzrlib.branch.BzrBranchFormat7',
109
 
            tree_format='bzrlib.workingtree_4.WorkingTreeFormat6',
 
107
            "breezy.tests.blackbox.test_exceptions.TestObsoleteRepoFormat",
 
108
            branch_format='breezy.branch.BzrBranchFormat7',
 
109
            tree_format='breezy.workingtree_4.WorkingTreeFormat6',
110
110
            deprecated=True,
111
111
            help='Same as 2a, but with an obsolete repo format.')
112
112
        self.disable_deprecation_warning()
130
130
            check = self.assertContainsRe
131
131
        else:
132
132
            check = self.assertNotContainsRe
133
 
        check(self.get_log(), 'WARNING.*bzr upgrade')
 
133
        check(self.get_log(), 'WARNING.*brz upgrade')
134
134
 
135
135
    def test_repository_deprecation_warning(self):
136
136
        """Old formats give a warning"""