Пример #1
0
 def testAbsSymlink(self):
     fname = 'dir/file2.txt'
     symlink = 'localconfig.py'
     self._createRegularFile(fname)
     os.symlink(path.join(self.tempdir, fname),
                path.join(self.tempdir, symlink))
     self.assertEqual(fname, getRealpath(symlink, cwd=self.tempdir))
Пример #2
0
 def testAbsSymlink(self):
     fname = 'dir/file2.txt'
     symlink = 'localconfig.py'
     self._createRegularFile(fname)
     os.symlink(path.join(self.tempdir, fname),
                path.join(self.tempdir, symlink))
     self.assertEqual(fname, getRealpath(symlink, cwd=self.tempdir))
Пример #3
0
 def testRelativeSymlinkToRelativeSymlink(self):
     fname = 'dir/file7.txt'
     symlink1 = 'production.py'
     symlink2 = 'localconfig.py'
     self._createRegularFile(fname)
     os.symlink(fname, path.join(self.tempdir, symlink1))
     os.symlink(symlink1, path.join(self.tempdir, symlink2))
     self.assertEqual(fname, getRealpath(symlink2, cwd=self.tempdir))
Пример #4
0
 def testRelativeSymlinkToRelativeSymlink(self):
     fname = 'dir/file7.txt'
     symlink1 = 'production.py'
     symlink2 = 'localconfig.py'
     self._createRegularFile(fname)
     os.symlink(fname, path.join(self.tempdir, symlink1))
     os.symlink(symlink1, path.join(self.tempdir, symlink2))
     self.assertEqual(fname, getRealpath(symlink2, cwd=self.tempdir))
Пример #5
0
 def testDepth(self):
     fname = 'dir1/dir2/dir3/file9.txt'
     symlink1 = 'production.py'
     symlink2 = 'localconfig.py'
     self._createRegularFile(fname)
     os.symlink(fname, path.join(self.tempdir, symlink1))
     os.symlink(symlink1, path.join(self.tempdir, symlink2))
     self.assertEqual(fname, getRealpath(symlink2, cwd=self.tempdir,
                                         depth=3))
Пример #6
0
 def test3Levels(self):
     fname = 'dir/file8.txt'
     symlink1 = 'symlink1'
     symlink2 = 'symlink2'
     symlink3 = 'symlink3'
     self._createRegularFile(fname)
     os.symlink(fname, path.join(self.tempdir, symlink1))
     os.symlink(symlink1, path.join(self.tempdir, symlink2))
     os.symlink(symlink2, path.join(self.tempdir, symlink3))
     self.assertEqual(fname, getRealpath(symlink3, cwd=self.tempdir))
Пример #7
0
 def testDepth(self):
     fname = 'dir1/dir2/dir3/file9.txt'
     symlink1 = 'production.py'
     symlink2 = 'localconfig.py'
     self._createRegularFile(fname)
     os.symlink(fname, path.join(self.tempdir, symlink1))
     os.symlink(symlink1, path.join(self.tempdir, symlink2))
     self.assertEqual(fname, getRealpath(symlink2,
                                         cwd=self.tempdir,
                                         depth=3))
Пример #8
0
 def test3Levels(self):
     fname = 'dir/file8.txt'
     symlink1 = 'symlink1'
     symlink2 = 'symlink2'
     symlink3 = 'symlink3'
     self._createRegularFile(fname)
     os.symlink(fname, path.join(self.tempdir, symlink1))
     os.symlink(symlink1, path.join(self.tempdir, symlink2))
     os.symlink(symlink2, path.join(self.tempdir, symlink3))
     self.assertEqual(fname, getRealpath(symlink3, cwd=self.tempdir))
Пример #9
0
 def testRegularFile(self):
     fname = 'dir/file1.txt'
     self._createRegularFile(fname)
     self.assertEqual(fname, getRealpath(fname))
Пример #10
0
 def testRegularFile(self):
     fname = 'dir/file1.txt'
     self._createRegularFile(fname)
     self.assertEqual(fname, getRealpath(fname))