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

Method __init__

tests/fixtures.py:68–75  ·  view source on GitHub ↗
(self)

Source from the content-addressed store, hash-verified

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

Callers

nothing calls this directly

Calls 1

joinMethod · 0.80

Tested by

no test coverage detected