From 58d9e379fe6a34411bae1af6a706fea2a21cf9f3 Mon Sep 17 00:00:00 2001 From: Ruslan Kuprieiev Date: Wed, 1 Feb 2023 03:14:22 +0200 Subject: [PATCH] tests: gc: use timedelta again (#8926) Leftover from #8912 --- tests/func/test_gc.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tests/func/test_gc.py b/tests/func/test_gc.py index fb6a53323..b081a0610 100644 --- a/tests/func/test_gc.py +++ b/tests/func/test_gc.py @@ -347,7 +347,7 @@ def test_date(tmp_dir, scm, dvc): tmp_dir.dvc_gen("testfile", "modified, again", commit="modify") - datestamp = now.date().replace(day=now.day - 1).isoformat() + datestamp = (now.date() - datetime.timedelta(days=1)).isoformat() dvc.gc(commit_date=datestamp) assert _count_files(dvc.odb.local.path) == 2 assert dvc.odb.local.exists("9ae73c65f418e6f79ceb4f0e4a4b98d5")