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

Function test_force

tests/test_features.py:59–77  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

57
58
59def test_force():
60 while len(_cache) > 0:
61 _cache.popitem()
62 assert not have("bogusfeature")
63 assert _cache["bogusfeature"] == False
64 force("bogusfeature", True)
65 assert have("bogusfeature")
66 assert _cache["bogusfeature"] == True
67 force("bogusfeature", False)
68 assert not have("bogusfeature")
69 assert _cache["bogusfeature"] == False
70 _requirements["unavailable"] = ["bogusmodule>=10000"]
71 try:
72 assert not have("unavailable")
73 assert _cache["unavailable"] == False
74 force("unavailable", True)
75 assert _cache["unavailable"] == True
76 finally:
77 del _requirements["unavailable"]

Callers

nothing calls this directly

Calls 2

haveFunction · 0.90
forceFunction · 0.90

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…