From 7bedbd9f360314b7217467c820c0d49ca862daca Mon Sep 17 00:00:00 2001 From: xzg Date: Wed, 6 Dec 2017 22:09:22 +0800 Subject: [PATCH] Add sleep 1s before create link again --- tests/test_file.py | 3 +++ 1 file changed, 3 insertions(+) diff --git a/tests/test_file.py b/tests/test_file.py index 4b04a96..ef08e8f 100644 --- a/tests/test_file.py +++ b/tests/test_file.py @@ -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