Be more conservative with delays

This commit is contained in:
Gabriel Augendre 2021-12-04 16:10:46 +01:00
parent 81b2b8961e
commit 5f11ae32e5
2 changed files with 1 additions and 4 deletions

View file

@ -114,9 +114,6 @@ def get_delai(heure_passage: str) -> str:
now = datetime.now()
delai = dt - now
minutes = delai.seconds // 60
seconds = delai.seconds % 60
if seconds > 30:
minutes += 1
if minutes <= 0:
return "Proche"
return f"{minutes} min"

View file

@ -21,7 +21,7 @@ def test_get_stop():
},
{
"ligne": "C17",
"delais": ["15 min", "40 min"],
"delais": ["14 min", "39 min"],
"destination": {"id": 46644, "name": "Charpennes"},
},
],