From 3ab62555bdedf4b4c9db1af3a0d4d0c4f8a92aa4 Mon Sep 17 00:00:00 2001 From: Ruslan Kuprieiev Date: Tue, 13 Mar 2018 20:50:44 +0200 Subject: [PATCH] tests: checkout: sleep(1) to emulate realistic behavior Signed-off-by: Ruslan Kuprieiev --- tests/test_checkout.py | 3 +++ 1 file changed, 3 insertions(+) diff --git a/tests/test_checkout.py b/tests/test_checkout.py index 7a248b1a2..0bba8e4cd 100644 --- a/tests/test_checkout.py +++ b/tests/test_checkout.py @@ -1,4 +1,5 @@ import os +import time import stat import shutil import filecmp @@ -30,6 +31,8 @@ class TestCheckoutCorruptedCacheFile(TestRepro): def test(self): cache = self.foo_stage.outs[0].cache + time.sleep(1) + os.chmod(cache, stat.S_IWRITE) with open(cache, 'a') as fd: fd.write('1')