(self)
| 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 |
nothing calls this directly
no test coverage detected