Put the since-when suffix in since, so its own test covers it

This commit is contained in:
2026-11-19 01:59:18 +01:00
parent 07ef481c51
commit 3e2e0ae5bf
2 changed files with 10 additions and 4 deletions
+7
View File
@@ -55,6 +55,13 @@ class TheStatusLines(unittest.TestCase):
class TheTimeSinceParking(unittest.TestCase):
def test_is_the_time_of_the_chunks_file_to_the_minute(self) -> None:
folder = pathlib.Path(tempfile.mkdtemp())
chunk = parked.Parked("ABC-20", "/code/api", "7", "s", "an approval")
parked.park(folder, chunk)
os.utime(parked.file_of(folder, "ABC-20"), (SINCE, SINCE))
self.assertEqual(status.since(folder, chunk), f", since {SINCE_ON}")
def test_is_empty_where_the_chunks_file_is_gone(self) -> None:
self.assertEqual(status.since(pathlib.Path(tempfile.mkdtemp()), parked.Parked("ABC-20", "/code/api", "7", "s", "an approval")), "")