mirror of https://github.com/flaggo/pydu.git
Add sleep 1s before create link again
This commit is contained in:
parent
927ff3aae4
commit
7bedbd9f36
|
@ -1,5 +1,6 @@
|
|||
import os
|
||||
import pytest
|
||||
import time
|
||||
from pydu.platform import WINDOWS
|
||||
from pydu.file import makedirs, remove, removes, open_file, copy, touch, symlink
|
||||
|
||||
|
@ -168,6 +169,7 @@ class TestLink:
|
|||
touch(f)
|
||||
link(f, link_f)
|
||||
t1 = os.path.getctime(link_f)
|
||||
time.sleep(1)
|
||||
link(f, link_f, overwrite=True)
|
||||
t2 = os.path.getctime(link_f)
|
||||
assert t1 != t2
|
||||
|
@ -195,6 +197,7 @@ class TestSymLink:
|
|||
touch(f)
|
||||
symlink(f, link_f)
|
||||
t1 = os.path.getctime(link_f)
|
||||
time.sleep(1)
|
||||
symlink(f, link_f, overwrite=True)
|
||||
t2 = os.path.getctime(link_f)
|
||||
assert t1 != t2
|
||||
|
|
Loading…
Reference in New Issue