MCPcopy Create free account
hub / github.com/ddnet/ddnet / TimeoutParam

Class TimeoutParam

scripts/integration_test.py:68–74  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

66# This class is used to track that each timeout value is multiplied by
67# `timeout_multiplier` exactly once.
68class TimeoutParam(namedtuple("Timeout", ["start", "unmultiplied_duration", "description"])):
69 def __new__(cls, duration, description):
70 return super().__new__(cls, time(), duration, description)
71
72 def remaining_duration(self, test_env):
73 duration = test_env.runner.timeout_multiplier * self.unmultiplied_duration
74 return max((self.start + duration) - time(), 0)
75
76
77def relpath(path, start=os.curdir):

Callers 2

__init__Method · 0.85
register_timeoutMethod · 0.85

Calls

no outgoing calls

Tested by 2

__init__Method · 0.68
register_timeoutMethod · 0.68