Exemplo n.º 1
0
 def test2(self):
     require_empty_dir('test-disk/dir')
     remove_file('link-to-non-existent')
     os.symlink('test-disk/non-existent', 'link-to-non-existent')
     assert (self.base ==
                  parent_path('link-to-non-existent'))
     remove_file('link-to-non-existent')
Exemplo n.º 2
0
 def test4(self):
     require_empty_dir(self.tmp_dir / 'foo')
     require_empty_dir(self.tmp_dir / 'bar')
     os.symlink('../bar/zap', self.tmp_dir / 'foo/zap')
     make_empty_file(self.tmp_dir / 'bar/zap')
     assert parent_path(self.tmp_dir / 'foo/zap') == \
            os.path.join(self.tmp_dir,'foo')
Exemplo n.º 3
0
 def test2(self):
     require_empty_dir('test-disk/dir')
     remove_file('link-to-non-existent')
     os.symlink('test-disk/non-existent', 'link-to-non-existent')
     assert_equals(self.base,
                   parent_path('link-to-non-existent'))
     remove_file('link-to-non-existent')
Exemplo n.º 4
0
 def test3(self):
     remove_file('foo')
     remove_file('bar')
     require_empty_dir('foo')
     require_empty_dir('bar')
     os.symlink('../bar/zap', 'foo/zap')
     assert os.path.join(self.base, 'foo') == parent_path('foo/zap')
     remove_file('foo')
     remove_file('bar')
Exemplo n.º 5
0
 def test(self):
     require_empty_dir('other_dir/dir')
     remove_file('dir')
     os.symlink('other_dir/dir', 'dir')
     make_empty_file('dir/foo')
     assert (os.path.join(self.base, 'other_dir/dir') ==
                  parent_path('dir/foo'))
     remove_file('dir')
     remove_file('other_dir')
Exemplo n.º 6
0
 def test(self):
     require_empty_dir('other_dir/dir')
     remove_file('dir')
     os.symlink('other_dir/dir', 'dir')
     having_file('dir/foo')
     assert_equals(os.path.join(self.base, 'other_dir/dir'),
                   parent_path('dir/foo'))
     remove_file('dir')
     remove_file('other_dir')
Exemplo n.º 7
0
 def test(self):
     require_empty_dir('other_dir/dir')
     remove_file('dir')
     os.symlink('other_dir/dir', 'dir')
     having_file('dir/foo')
     assert_equals(os.path.join(self.base,'other_dir/dir'),
                   parent_path('dir/foo'))
     remove_file('dir')
     remove_file('other_dir')
Exemplo n.º 8
0
 def test4(self):
     remove_file('foo')
     remove_file('bar')
     require_empty_dir('foo')
     require_empty_dir('bar')
     os.symlink('../bar/zap', 'foo/zap')
     make_empty_file('bar/zap')
     assert_equal(os.path.join(self.base, 'foo'), parent_path('foo/zap'))
     remove_file('foo')
     remove_file('bar')
Exemplo n.º 9
0
 def test3(self):
     remove_file('foo')
     remove_file('bar')
     require_empty_dir('foo')
     require_empty_dir('bar')
     os.symlink('../bar/zap', 'foo/zap')
     assert_equals(os.path.join(self.base,'foo'),
                   parent_path('foo/zap'))
     remove_file('foo')
     remove_file('bar')
Exemplo n.º 10
0
 def test2(self):
     require_empty_dir(self.tmp_dir / 'test-disk/dir')
     os.symlink(self.tmp_dir / 'test-disk/non-existent',
                self.tmp_dir / 'link-to-non-existent')
     assert parent_path(self.tmp_dir / 'link-to-non-existent') == \
            self.tmp_dir
Exemplo n.º 11
0
 def test(self):
     require_empty_dir(self.tmp_dir / 'other_dir/dir')
     os.symlink(self.tmp_dir / 'other_dir/dir', self.tmp_dir / 'dir')
     make_empty_file(self.tmp_dir / 'dir/foo')
     assert (self.tmp_dir / 'other_dir/dir' == parent_path(self.tmp_dir / 'dir/foo'))