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

Function test_have

tests/test_features.py:43–56  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

41 not have_cryptography, reason="cryptography not available or too old"
42)
43def test_have():
44 # ensure cache is empty; we can't just assign as our local is shadowing the
45 # variable in dns._features
46 while len(_cache) > 0:
47 _cache.popitem()
48 assert have("dnssec")
49 assert _cache["dnssec"] == True
50 assert not have("bogusfeature")
51 assert _cache["bogusfeature"] == False
52 _requirements["unavailable"] = ["bogusmodule>=10000"]
53 try:
54 assert not have("unavailable")
55 finally:
56 del _requirements["unavailable"]
57
58
59def test_force():

Callers

nothing calls this directly

Calls 1

haveFunction · 0.90

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…