Make Python code conform to the Python PEP 8 style guide

This commit is contained in:
practicalswift
2018-02-21 19:46:04 +01:00
committed by Christian Decker
parent 0ac5e93065
commit ae7d857c44
4 changed files with 191 additions and 185 deletions

View File

@@ -1,16 +1,13 @@
from concurrent.futures import ThreadPoolExecutor
from lightning import LightningRpc
from test_lightningd import NodeFactory
import logging
import pytest
import random
import utils
from concurrent import futures
from test_lightningd import NodeFactory
from time import time
from tqdm import tqdm
num_workers = 480
num_payments = 10000
@@ -21,6 +18,7 @@ def executor():
yield ex
ex.shutdown(wait=False)
@pytest.fixture(scope="module")
def bitcoind():
bitcoind = utils.BitcoinD(rpcport=28332)
@@ -42,12 +40,14 @@ def bitcoind():
bitcoind.proc.kill()
bitcoind.proc.wait()
@pytest.fixture
def node_factory(request, bitcoind, executor):
nf = NodeFactory(request.node.name, bitcoind, executor)
yield nf
nf.killall()
def test_single_hop(node_factory, executor):
l1 = node_factory.get_node()
l2 = node_factory.get_node()
@@ -74,6 +74,7 @@ def test_single_hop(node_factory, executor):
diff = time() - start_time
print("Done. %d payments performed in %f seconds (%f payments per second)" % (num_payments, diff, num_payments / diff))
def test_single_payment(node_factory, benchmark):
l1 = node_factory.get_node()
l2 = node_factory.get_node()