MCPcopy Create free account
hub / github.com/rthalley/dnspython / test_compute_timeout

Method test_compute_timeout

tests/test_resolver.py:983–991  ·  view source on GitHub ↗
(self)

Source from the content-addressed store, hash-verified

981 )
982
983 def test_compute_timeout(self):
984 res = dns.resolver.Resolver(configure=False)
985 now = time.time()
986 self.assertRaises(
987 dns.resolver.Timeout, lambda: res._compute_timeout(now + 10000)
988 )
989 self.assertRaises(dns.resolver.Timeout, lambda: res._compute_timeout(0))
990 # not raising is the test
991 res._compute_timeout(now + 0.5)
992
993 if sys.platform == "win32":
994

Callers

nothing calls this directly

Calls 2

timeMethod · 0.80
_compute_timeoutMethod · 0.80

Tested by

no test coverage detected