Exemple #1
0
 def test_with_rewinding_base(self):
     entry = v1.format_entry('../vdir', '../path:target', self.fs)
     self.assertEqual(entry, ('/a/b/path', 'target'))
Exemple #2
0
 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'))
Exemple #3
0
 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'))
Exemple #4
0
 def test_with_relative_path(self):
     entry = v1.format_entry('vdir', 'd:other', self.fs)
     self.assertEqual(entry, ('/a/b/c/vdir/d', 'other'))
Exemple #5
0
 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'))