~bzr-pqm/bzr/bzr.dev

« back to all changes in this revision

Viewing changes to bzrlib/tests/blackbox/test_exceptions.py

MergeĀ lp:bzr.

Show diffs side-by-side

added added

removed removed

Lines of Context:
141
141
 
142
142
    def test_repository_deprecation_warning_suppressed_global(self):
143
143
        """Old formats give a warning"""
144
 
        conf = config.GlobalConfig()
145
 
        conf.set_user_option('suppress_warnings', 'format_deprecation')
 
144
        conf = config.GlobalStack()
 
145
        conf.set('suppress_warnings', 'format_deprecation')
146
146
        self.make_obsolete_repo('foo')
147
147
        self.enable_deprecation_warning()
148
148
        out, err = self.run_bzr('status', working_dir='foo')
151
151
    def test_repository_deprecation_warning_suppressed_locations(self):
152
152
        """Old formats give a warning"""
153
153
        self.make_obsolete_repo('foo')
154
 
        conf = config.LocationConfig(osutils.pathjoin(self.test_dir, 'foo'))
155
 
        conf.set_user_option('suppress_warnings', 'format_deprecation')
 
154
        conf = config.LocationStack(osutils.pathjoin(self.test_dir, 'foo'))
 
155
        conf.set('suppress_warnings', 'format_deprecation')
156
156
        self.enable_deprecation_warning()
157
157
        out, err = self.run_bzr('status', working_dir='foo')
158
158
        self.check_warning(False)
160
160
    def test_repository_deprecation_warning_suppressed_branch(self):
161
161
        """Old formats give a warning"""
162
162
        tree = self.make_obsolete_repo('foo')
163
 
        conf = tree.branch.get_config()
164
 
        conf.set_user_option('suppress_warnings', 'format_deprecation')
 
163
        conf = tree.branch.get_config_stack()
 
164
        conf.set('suppress_warnings', 'format_deprecation')
165
165
        self.enable_deprecation_warning()
166
166
        out, err = self.run_bzr('status', working_dir='foo')
167
167
        self.check_warning(False)