raise value error if round was too short

This commit is contained in:
Yannik Schmidt
2020-09-30 08:21:06 +02:00
parent 39a5a89ccc
commit 2be034c3fe

View File

@@ -19,6 +19,8 @@ class Round:
if duration <= dt.timedelta(0):
raise ValueError("Duration cannot be zero")
if duration <= dt.timedelta(seconds=120):
raise ValueError("Games was too short")
self.winners = winnerTeam
self.losers = loserTeam