~amanica/bzr/320119-log_exclusive_lower_bound

« back to all changes in this revision

Viewing changes to bzrlib/tests/test_osutils.py

  • Committer: Marius Kruger
  • Date: 2009-08-01 23:31:52 UTC
  • mfrom: (4511.1.69 +trunk)
  • Revision ID: amanic@gmail.com-20090801233152-m2l31ll5qbcr4xz6
merge with bzr.dev

Show diffs side-by-side

added added

removed removed

Lines of Context:
625
625
        self.assertEqual("1234", output.getvalue())
626
626
 
627
627
 
 
628
class TestRelpath(tests.TestCase):
 
629
 
 
630
    def test_simple_relpath(self):
 
631
        cwd = osutils.getcwd()
 
632
        subdir = cwd + '/subdir'
 
633
        self.assertEqual('subdir', osutils.relpath(cwd, subdir))
 
634
 
 
635
    def test_deep_relpath(self):
 
636
        cwd = osutils.getcwd()
 
637
        subdir = cwd + '/sub/subsubdir'
 
638
        self.assertEqual('sub/subsubdir', osutils.relpath(cwd, subdir))
 
639
 
 
640
    def test_not_relative(self):
 
641
        self.assertRaises(errors.PathNotChild,
 
642
                          osutils.relpath, 'C:/path', 'H:/path')
 
643
        self.assertRaises(errors.PathNotChild,
 
644
                          osutils.relpath, 'C:/', 'H:/path')
 
645
 
 
646
 
628
647
class TestSafeUnicode(tests.TestCase):
629
648
 
630
649
    def test_from_ascii_string(self):