()
| 41 | not have_cryptography, reason="cryptography not available or too old" |
| 42 | ) |
| 43 | def 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 | |
| 59 | def test_force(): |
nothing calls this directly
no test coverage detected
searching dependent graphs…