MCPcopy Create free account
hub / github.com/ElementsProject/lightning / CompatLevel

Class CompatLevel

tests/fixtures.py:65–78  ·  view source on GitHub ↗

An object that encapsulates the compat-level of our build.

Source from the content-addressed store, hash-verified

63
64
65class CompatLevel(object):
66 """An object that encapsulates the compat-level of our build.
67 """
68 def __init__(self):
69 makefile = os.path.join(os.path.dirname(__file__), "..", "Makefile")
70 with open(makefile, 'r') as f:
71 lines = [l for l in f if l.startswith('COMPAT_CFLAGS')]
72 assert(len(lines) == 1)
73 line = lines[0]
74 flags = re.findall(r'COMPAT_V([0-9]+)=1', line)
75 self.compat_flags = flags
76
77 def __call__(self, version):
78 return COMPAT and version in self.compat_flags
79
80
81@pytest.fixture

Callers 2

compatFunction · 0.85
is_compatFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected