/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 bzrlib/tests/test_selftest.py

  • Committer: Vincent Ladeuil
  • Date: 2011-05-13 10:59:20 UTC
  • mto: (5853.1.2 trunk) (5609.38.1 2.3)
  • mto: This revision was merged to the branch mainline in revision 5861.
  • Revision ID: v.ladeuil+lp@free.fr-20110513105920-5mvhsxckddrmbvnf
Backport deprecation, and tests for failIfExists and failUnlessExists

Show diffs side-by-side

added added

removed removed

Lines of Context:
512
512
        self.assertRaises(AssertionError, self.assertEqualStat,
513
513
            os.lstat("foo"), os.lstat("longname"))
514
514
 
 
515
    def test_failUnlessExists(self):
 
516
        """Deprecated failUnlessExists and failIfExists"""
 
517
        self.applyDeprecated(
 
518
            deprecated_in((2, 4)),
 
519
            self.failUnlessExists, '.')
 
520
        self.build_tree(['foo/', 'foo/bar'])
 
521
        self.applyDeprecated(
 
522
            deprecated_in((2, 4)),
 
523
            self.failUnlessExists, 'foo/bar')
 
524
        self.applyDeprecated(
 
525
            deprecated_in((2, 4)),
 
526
            self.failIfExists, 'foo/foo')
 
527
 
 
528
    def test_assertPathExists(self):
 
529
        self.assertPathExists('.')
 
530
        self.build_tree(['foo/', 'foo/bar'])
 
531
        self.assertPathExists('foo/bar')
 
532
        self.assertPathDoesNotExist('foo/foo')
 
533
 
515
534
 
516
535
class TestTestCaseWithMemoryTransport(tests.TestCaseWithMemoryTransport):
517
536