~bzr-pqm/bzr/bzr.dev

« back to all changes in this revision

Viewing changes to bzrlib/tests/test_bzrdir.py

  • Committer: Canonical.com Patch Queue Manager
  • Date: 2010-08-20 11:10:10 UTC
  • mfrom: (5384.1.2 integration)
  • Revision ID: pqm@pqm.ubuntu.com-20100820111010-xwracendg19hytgt
(vila) `bzr remove` now just backs up changed files instead of
        annoying you (Marius Kruger)

Show diffs side-by-side

added added

removed removed

Lines of Context:
1411
1411
        param_repr = param_reprs[0]
1412
1412
        self.assertStartsWith(param_repr, '<RepoInitHookParams for ')
1413
1413
 
 
1414
 
 
1415
class TestGenerateBackupName(TestCaseWithMemoryTransport):
 
1416
 
 
1417
    def setUp(self):
 
1418
        super(TestGenerateBackupName, self).setUp()
 
1419
        self._transport = get_transport(self.get_url())
 
1420
        bzrdir.BzrDir.create(self.get_url(),
 
1421
            possible_transports=[self._transport])
 
1422
        self._bzrdir = bzrdir.BzrDir.open_from_transport(self._transport)
 
1423
 
 
1424
    def test_new(self):
 
1425
        self.assertEqual("a.~1~", self._bzrdir.generate_backup_name("a"))
 
1426
 
 
1427
    def test_exiting(self):
 
1428
        self._transport.put_bytes("a.~1~", "some content")
 
1429
        self.assertEqual("a.~2~", self._bzrdir.generate_backup_name("a"))