drain: adds __init__.py and cleanups flake8 nits

This commit is contained in:
Michael Schmoock
2020-11-30 10:02:17 +01:00
committed by Christian Decker
parent b7abc6f188
commit 04254693ab
4 changed files with 37 additions and 35 deletions

0
drain/__init__.py Normal file
View File

View File

@@ -1,6 +1,6 @@
#!/usr/bin/env python3
from pyln.client import Plugin, Millisatoshi, RpcError
from utils import *
from utils import get_ours, wait_ours
import re
import time
import uuid
@@ -157,7 +157,7 @@ def test_or_set_chunks(plugin, payload):
continue
try:
spend, recv = spendable_from_scid(plugin, payload, channel['short_channel_id'], True)
except RpcError as e:
except RpcError:
continue
channels[channel['short_channel_id']] = {
'spendable': spend,

View File

@@ -1,14 +1,16 @@
from pyln.testing.fixtures import *
from pyln.testing.fixtures import * # noqa: F401,F403
from pyln.testing.utils import DEVELOPER
from pyln.client import RpcError, Millisatoshi
from utils import *
from pyln.client import RpcError
from .utils import get_ours, get_theirs, wait_ours, wait_for_all_htlcs
import os
import unittest
import pytest
pluginopt = {'plugin': os.path.join(os.path.dirname(__file__), "drain.py")}
EXPERIMENTAL_FEATURES = int(os.environ.get("EXPERIMENTAL_FEATURES", "0"))
@unittest.skipIf(not DEVELOPER, "slow gossip, needs DEVELOPER=1")
def test_drain_and_refill(node_factory, bitcoind):
# Scenario: first drain then refill