From 2f4c819a6613e892b20e3eb12abb98e0b717f066 Mon Sep 17 00:00:00 2001 From: George Dang <53052793+gtdang@users.noreply.github.com> Date: Wed, 8 May 2024 10:39:00 -0400 Subject: [PATCH] tests: add sleep to test_write_configuration overwrite check --- hnn_core/tests/test_io.py | 2 ++ 1 file changed, 2 insertions(+) diff --git a/hnn_core/tests/test_io.py b/hnn_core/tests/test_io.py index 9a058a9cfc..70105f60aa 100644 --- a/hnn_core/tests/test_io.py +++ b/hnn_core/tests/test_io.py @@ -3,6 +3,7 @@ # Rajat Partani from pathlib import Path +from time import sleep import pytest import numpy as np @@ -168,6 +169,7 @@ def test_write_configuration(tmp_path, jones_2009_network): # Overwrite network check last_mod_time1 = path_out.stat().st_mtime + sleep(0.05) jones_2009_network.write_configuration(path_out) last_mod_time2 = path_out.stat().st_mtime assert last_mod_time1 < last_mod_time2