mirror of
https://github.com/explosion/spaCy.git
synced 2025-08-07 21:54:54 +03:00
Add sleep to ensure later timestamps
This commit is contained in:
parent
8f521c34de
commit
816245f103
|
@ -3,6 +3,7 @@ import math
|
||||||
import pkg_resources
|
import pkg_resources
|
||||||
from random import sample
|
from random import sample
|
||||||
from typing import Counter
|
from typing import Counter
|
||||||
|
import time
|
||||||
|
|
||||||
import pytest
|
import pytest
|
||||||
import srsly
|
import srsly
|
||||||
|
@ -864,7 +865,11 @@ def test_local_remote_storage():
|
||||||
with make_tempdir() as d:
|
with make_tempdir() as d:
|
||||||
filename = "a.txt"
|
filename = "a.txt"
|
||||||
|
|
||||||
for content_hash in ("aaaa", "bbbb", "cccc"):
|
content_hashes = ("aaaa", "cccc", "bbbb")
|
||||||
|
for i, content_hash in enumerate(content_hashes):
|
||||||
|
# make sure that each subsequent file has a later timestamp
|
||||||
|
if i > 0:
|
||||||
|
time.sleep(1)
|
||||||
content = f"{content_hash} content"
|
content = f"{content_hash} content"
|
||||||
loc_file = d / "root" / filename
|
loc_file = d / "root" / filename
|
||||||
if not loc_file.parent.exists():
|
if not loc_file.parent.exists():
|
||||||
|
|
Loading…
Reference in New Issue
Block a user