Skip to content
This repository has been archived by the owner on Dec 16, 2022. It is now read-only.

Commit

Permalink
fix file utils test (#4349)
Browse files Browse the repository at this point in the history
  • Loading branch information
epwalsh authored Jun 10, 2020
1 parent f4d330a commit 33d0cd8
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions tests/common/file_utils_test.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@
import os
import pathlib
import json
import time

import pytest
import responses
Expand Down Expand Up @@ -81,6 +82,8 @@ def mocked_http_etag(url: str):
f.write("some random data")
with open(meta_filename, "w") as meta_f:
json.dump({"url": url, "etag": etag}, meta_f)
# os.path.getmtime is only accurate to the second.
time.sleep(1.1)

# The version corresponding to the last etag should be returned, since
# that one has the latest "last modified" time.
Expand Down

0 comments on commit 33d0cd8

Please sign in to comment.