tests: move EXP_DF into the testing utils

This commit is contained in:
niftynei 2021-05-07 13:27:54 -05:00 committed by Rusty Russell
parent 7a488cc11e
commit 484d6bde83
5 changed files with 7 additions and 6 deletions

View File

@ -79,6 +79,7 @@ TEST_DEBUG = env("TEST_DEBUG", "0") == "1"
SLOW_MACHINE = env("SLOW_MACHINE", "0") == "1" SLOW_MACHINE = env("SLOW_MACHINE", "0") == "1"
DEPRECATED_APIS = env("DEPRECATED_APIS", "0") == "1" DEPRECATED_APIS = env("DEPRECATED_APIS", "0") == "1"
TIMEOUT = int(env("TIMEOUT", 180 if SLOW_MACHINE else 60)) TIMEOUT = int(env("TIMEOUT", 180 if SLOW_MACHINE else 60))
EXPERIMENTAL_DUAL_FUND = env("EXPERIMENTAL_DUAL_FUND", "0") == "1"
def wait_for(success, timeout=TIMEOUT): def wait_for(success, timeout=TIMEOUT):

View File

@ -2,11 +2,11 @@ from fixtures import * # noqa: F401,F403
from flaky import flaky from flaky import flaky
from pyln.client import RpcError, Millisatoshi from pyln.client import RpcError, Millisatoshi
from shutil import copyfile from shutil import copyfile
from pyln.testing.utils import SLOW_MACHINE from pyln.testing.utils import SLOW_MACHINE, EXPERIMENTAL_DUAL_FUND
from utils import ( from utils import (
only_one, sync_blockheight, wait_for, DEVELOPER, TIMEOUT, only_one, sync_blockheight, wait_for, DEVELOPER, TIMEOUT,
account_balance, first_channel_id, basic_fee, TEST_NETWORK, account_balance, first_channel_id, basic_fee, TEST_NETWORK,
EXPERIMENTAL_FEATURES, EXPERIMENTAL_DUAL_FUND, scriptpubkey_addr EXPERIMENTAL_FEATURES, scriptpubkey_addr
) )
import os import os

View File

@ -9,9 +9,9 @@ from utils import (
expected_channel_features, expected_channel_features,
check_coin_moves, first_channel_id, account_balance, basic_fee, check_coin_moves, first_channel_id, account_balance, basic_fee,
scriptpubkey_addr, scriptpubkey_addr,
EXPERIMENTAL_FEATURES, EXPERIMENTAL_DUAL_FUND EXPERIMENTAL_FEATURES
) )
from pyln.testing.utils import SLOW_MACHINE, VALGRIND from pyln.testing.utils import SLOW_MACHINE, VALGRIND, EXPERIMENTAL_DUAL_FUND
import os import os
import pytest import pytest

View File

@ -4,9 +4,10 @@ from fixtures import TEST_NETWORK
from flaky import flaky # noqa: F401 from flaky import flaky # noqa: F401
from pyln.client import RpcError, Millisatoshi from pyln.client import RpcError, Millisatoshi
from pyln.proto.onion import TlvPayload from pyln.proto.onion import TlvPayload
from pyln.testing.utils import EXPERIMENTAL_DUAL_FUND
from utils import ( from utils import (
DEVELOPER, wait_for, only_one, sync_blockheight, TIMEOUT, DEVELOPER, wait_for, only_one, sync_blockheight, TIMEOUT,
EXPERIMENTAL_FEATURES, env, VALGRIND, EXPERIMENTAL_DUAL_FUND EXPERIMENTAL_FEATURES, env, VALGRIND
) )
import copy import copy
import os import os

View File

@ -5,7 +5,6 @@ from pyln.client import Millisatoshi
EXPERIMENTAL_FEATURES = env("EXPERIMENTAL_FEATURES", "0") == "1" EXPERIMENTAL_FEATURES = env("EXPERIMENTAL_FEATURES", "0") == "1"
COMPAT = env("COMPAT", "1") == "1" COMPAT = env("COMPAT", "1") == "1"
EXPERIMENTAL_DUAL_FUND = env("EXPERIMENTAL_DUAL_FUND", "0") == "1"
def hex_bits(features): def hex_bits(features):