~bzr-pqm/bzr/bzr.dev

« back to all changes in this revision

Viewing changes to bzrlib/tests/test_transform.py

(gz) Avoid stringifying FileExists in test_transform which need not care
 about message localisation (Martin Packman)

Show diffs side-by-side

added added

removed removed

Lines of Context:
1476
1476
        # The rename will fail because the target directory is not empty (but
1477
1477
        # raises FileExists anyway).
1478
1478
        err = self.assertRaises(errors.FileExists, tt_helper)
1479
 
        self.assertContainsRe(str(err),
1480
 
            "^File exists: .+/baz")
 
1479
        self.assertEndsWith(err.path, "/baz")
1481
1480
 
1482
1481
    def test_two_directories_clash(self):
1483
1482
        def tt_helper():
1495
1494
                wt.unlock()
1496
1495
                raise
1497
1496
        err = self.assertRaises(errors.FileExists, tt_helper)
1498
 
        self.assertContainsRe(str(err),
1499
 
            "^File exists: .+/foo")
 
1497
        self.assertEndsWith(err.path, "/foo")
1500
1498
 
1501
1499
    def test_two_directories_clash_finalize(self):
1502
1500
        def tt_helper():
1514
1512
                tt.finalize()
1515
1513
                raise
1516
1514
        err = self.assertRaises(errors.FileExists, tt_helper)
1517
 
        self.assertContainsRe(str(err),
1518
 
            "^File exists: .+/foo")
 
1515
        self.assertEndsWith(err.path, "/foo")
1519
1516
 
1520
1517
    def test_file_to_directory(self):
1521
1518
        wt = self.make_branch_and_tree('.')