mirror of
https://github.com/ElementsProject/lightning.git
synced 2024-11-19 18:11:28 +01:00
7201cb7315
pytest captures the output by monkey patching out `sys.stdout`. This may conflict with our use of `sys.stdout` when configuring logging, resulting in the "Write to closed file" issue that is spamming the logs. By making the logging configuration a fixture hopefully we always use the correct stdout (after pytest has monkey-patched it).
20 lines
656 B
Python
20 lines
656 B
Python
from utils import DEVELOPER, TEST_NETWORK # noqa: F401,F403
|
|
from pyln.testing.fixtures import directory, test_base_dir, test_name, chainparams, node_factory, bitcoind, teardown_checks, db_provider, executor, setup_logging # noqa: F401,F403
|
|
from pyln.testing import utils
|
|
|
|
import pytest
|
|
|
|
|
|
@pytest.fixture
|
|
def node_cls():
|
|
return LightningNode
|
|
|
|
|
|
class LightningNode(utils.LightningNode):
|
|
def __init__(self, *args, **kwargs):
|
|
utils.LightningNode.__init__(self, *args, **kwargs)
|
|
|
|
# Yes, we really want to test the local development version, not
|
|
# something in out path.
|
|
self.daemon.executable = 'lightningd/lightningd'
|