def test_with_rewinding_base(self): entry = v1.format_entry('../vdir', '../path:target', self.fs) self.assertEqual(entry, ('/a/b/path', 'target'))
def test_with_rewinding_path(self): entry = v1.format_entry('vdir', '../../and/up/again:other', self.fs) self.assertEqual(entry, ('/a/b/and/up/again', 'other'))
def test_with_user_home(self): entry = v1.format_entry('vdir', '~/my/root:one/dir', self.fs) self.assertEqual(entry, (f"{self.fs.home}/my/root", 'one/dir'))
def test_with_relative_path(self): entry = v1.format_entry('vdir', 'd:other', self.fs) self.assertEqual(entry, ('/a/b/c/vdir/d', 'other'))
def test_with_absolute_path(self): entry = v1.format_entry('vdir', '/root/some/path:one/dir', self.fs) self.assertEqual(entry, ('/root/some/path', 'one/dir'))