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

Method __init__

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

Source from the content-addressed store, hash-verified

56 """An object that encapsulates the compat-level of our build.
57 """
58 def __init__(self):
59 makefile = os.path.join(os.path.dirname(__file__), "..", "Makefile")
60 lines = [l for l in open(makefile, 'r') if l.startswith('COMPAT_CFLAGS')]
61 assert(len(lines) == 1)
62 line = lines[0]
63 flags = re.findall(r'COMPAT_V([0-9]+)=1', line)
64 self.compat_flags = flags
65
66 def __call__(self, version):
67 return COMPAT and version in self.compat_flags

Callers 1

__init__Method · 0.45

Calls 1

joinMethod · 0.80

Tested by

no test coverage detected