172
172
error = errors.ReadError(path)
173
173
self.assertEqualDiff("Error reading from u'a path'.", str(error))
175
def test_bad_index_format_signature(self):
176
error = errors.BadIndexFormatSignature("foo", "bar")
177
self.assertEqual("foo is not an index of type bar.",
180
def test_bad_index_data(self):
181
error = errors.BadIndexData("foo")
182
self.assertEqual("Error in data for index foo.",
185
def test_bad_index_duplicate_key(self):
186
error = errors.BadIndexDuplicateKey("foo", "bar")
187
self.assertEqual("The key 'foo' is already in index 'bar'.",
190
def test_bad_index_key(self):
191
error = errors.BadIndexKey("foo")
192
self.assertEqual("The key 'foo' is not a valid key.",
195
def test_bad_index_options(self):
196
error = errors.BadIndexOptions("foo")
197
self.assertEqual("Could not parse options for index foo.",
200
def test_bad_index_value(self):
201
error = errors.BadIndexValue("foo")
202
self.assertEqual("The value 'foo' is not a valid value.",
176
205
def test_bzrnewerror_is_deprecated(self):
177
206
class DeprecatedError(errors.BzrNewError):