mirror of https://github.com/flaggo/pydu.git
makedir before open an not exist file
This commit is contained in:
parent
a58d48209a
commit
fd0965e02f
|
@ -215,6 +215,7 @@ class Testcopy():
|
|||
link_f = str(tmpdir.join('test/test_link.txt'))
|
||||
d_copy = str(tmpdir.join('test_copy'))
|
||||
new_link_f = str(tmpdir.join('test_copy/test_link.txt'))
|
||||
makedirs(d)
|
||||
open(f, 'w')
|
||||
os.symlink(f, link_f)
|
||||
copy(d, d_copy, follow_symlinks=True)
|
||||
|
@ -229,6 +230,7 @@ class Testcopy():
|
|||
link_f = str(tmpdir.join('test/test_link.txt'))
|
||||
d_copy = str(tmpdir.join('test_copy'))
|
||||
new_link_f = str(tmpdir.join('test_copy/test_link.txt'))
|
||||
makedirs(d)
|
||||
open(f, 'w')
|
||||
os.symlink(f, link_f)
|
||||
copy(d, d_copy)
|
||||
|
@ -243,7 +245,7 @@ class Testcopy():
|
|||
copy_link_file = str(tmpdir.join('test_copy.link'))
|
||||
open(file, 'w')
|
||||
link(file, link_file)
|
||||
copy(link_file, copy_link_file,follow_symlinks=True)
|
||||
copy(link_file, copy_link_file, follow_symlinks=True)
|
||||
assert os.path.exists(copy_link_file)
|
||||
assert not os.path.islink(copy_link_file)
|
||||
|
||||
|
|
Loading…
Reference in New Issue