Пример #1
0
 def test_relative_path_to(self):
     fse1 = _FileSystemElement('foo.txt', 'bar')
     fse2 = _FileSystemElement('zoo.html', 'goo')
     self.assertEqual('../goo/zoo.html', fse1.relative_path_to(fse2))
     self.assertEqual('../bar/foo.txt', fse2.relative_path_to(fse1))
Пример #2
0
 def test_relative_path_to(self):
     fse1 = _FileSystemElement('foo.txt', 'bar')
     fse2 = _FileSystemElement('zoo.html', 'goo')
     self.assertEqual(os.path.join('..','goo','zoo.html'), fse1.relative_path_to(fse2))
     self.assertEqual(os.path.join('..', 'bar', 'foo.txt'), fse2.relative_path_to(fse1))
Пример #3
0
 def test_relative_path_to(self):
     fse1 = _FileSystemElement('foo.txt', 'bar')
     fse2 = _FileSystemElement('zoo.html', 'goo')
     self.assertEqual('../goo/zoo.html', fse1.relative_path_to(fse2))
     self.assertEqual('../bar/foo.txt', fse2.relative_path_to(fse1))
Пример #4
0
 def test_relative_path_to(self):
     fse1 = _FileSystemElement("foo.txt", "bar")
     fse2 = _FileSystemElement("zoo.html", "goo")
     self.assertEqual("../goo/zoo.html", fse1.relative_path_to(fse2))
     self.assertEqual("../bar/foo.txt", fse2.relative_path_to(fse1))