Coverage for ejpiaj/registry: 71%

# Coverage for ejpiaj/registry : 71%

## 28 statements 20 run 8 missing 0 excluded

Hot-keys on this page

r m x p toggle line displays

j k next/prev highlighted chunk

0 (zero) top of page

1 (one) first highlighted chunk

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 | EXTRACTORS = {} ASSERTIONS = {} def register_variables_extractor(name, extractor): EXTRACTORS[name] = extractor def unregister_variables_extractor(name): del EXTRACTORS[name] def get_variables_extractors(): return EXTRACTORS def get_variables_extractor(name): try: return EXTRACTORS[name] except KeyError: raise UnregisteredVariablesExtractor(name) class UnregisteredVariablesExtractor(Exception): pass def register_assertion(name, assertion): ASSERTIONS[name] = assertion def unregister_assertion(name): del ASSERTIONS[name] def get_assertions(): return ASSERTIONS def get_assertion(name): try: return ASSERTIONS[name] except KeyError: raise UnregisteredAssertion(name) class UnregisteredAssertion(Exception): pass