Skip to content

Commit fb83942

Browse files
Update batchflow/tests/detachable_test.py
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
1 parent 2d13991 commit fb83942

1 file changed

Lines changed: 3 additions & 1 deletion

File tree

batchflow/tests/detachable_test.py

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -42,7 +42,9 @@ def test_plot_save_with_detach():
4242
savepath2 = os.path.join(tmpdir, "test_save_detach2.png")
4343
p.save(savepath=savepath2, detach=True)
4444
import time
45-
time.sleep(1)
45+
deadline = time.monotonic() + 5
46+
while not os.path.exists(savepath2) and time.monotonic() < deadline:
47+
time.sleep(0.05)
4648
assert os.path.exists(savepath2)
4749

4850

0 commit comments

Comments
 (0)