test: add sleep() calls

Signed-off-by: Ruslan Kuprieiev <[email protected]>
This commit is contained in:
Ruslan Kuprieiev
2018-07-03 01:33:13 +03:00
parent db5cb125fb
commit 71d03b5a43
+5
View File
@@ -23,6 +23,7 @@ from tests.basic_env import TestDvc
from tests.test_data_cloud import _should_test_aws, TEST_AWS_REPO_BUCKET
from tests.test_data_cloud import _should_test_gcp, TEST_GCP_REPO_BUCKET
from tests.test_data_cloud import _should_test_ssh, _should_test_hdfs
from tests.test_data_cloud import sleep
class TestRepro(TestDvc):
@@ -55,6 +56,8 @@ class TestReproDepUnderDir(TestDvc):
os.unlink(self.DATA)
shutil.copyfile(self.FOO, self.DATA)
sleep()
stages = self.dvc.reproduce(self.file1_stage)
self.assertEqual(len(stages), 2)
self.assertTrue(filecmp.cmp(self.file1, self.FOO))
@@ -336,6 +339,8 @@ class TestReproExternalBase(TestDvc):
self.write(self.bucket, foo_key, self.BAR_CONTENTS)
sleep()
stages = self.dvc.reproduce(import_stage.path)
self.assertEqual(len(stages), 1)
self.assertTrue(os.path.exists('import'))