/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/test_errors.py

  • Committer: Martin
  • Date: 2017-06-09 16:22:29 UTC
  • mto: This revision was merged to the branch mainline in revision 6673.
  • Revision ID: gzlist@googlemail.com-20170609162229-f933azzv5h8xl8xx
Avoid PendingDeprecationWarning from assertRegexpMatches

Show diffs side-by-side

added added

removed removed

Lines of Context:
58
58
 
59
59
    def test_bad_filename_encoding(self):
60
60
        error = errors.BadFilenameEncoding(b'bad/filen\xe5me', 'UTF-8')
61
 
        self.assertRegexpMatches(
 
61
        self.assertContainsRe(
62
62
            str(error),
63
63
            "^Filename b?'bad/filen\\\\xe5me' is not valid in your current"
64
64
            " filesystem encoding UTF-8$")
291
291
        # a unicode path to check that %r is being used.
292
292
        path = u'a path'
293
293
        error = errors.ReadError(path)
294
 
        self.assertRegexpMatches(str(error), "Error reading from u?'a path'.")
 
294
        self.assertContainsRe(str(error), "^Error reading from u?'a path'.$")
295
295
 
296
296
    def test_bad_index_format_signature(self):
297
297
        error = errors.BadIndexFormatSignature("foo", "bar")