<commit_before>import pexpect
import pytest
from eth_utils import to_checksum_address

from raiden.constants import Environment
from raiden.settings import RED_EYES_CONTRACT_VERSION
from raiden.tests.integration.cli.util import (
    expect_cli_normal_startup,
    expect_cli_successful_connected,
    expect_cli_until_acknowledgment,
)

EXPECTED_DEFAULT_ENVIRONMENT_VALUE = Environment.PRODUCTION.value

pytestmark = pytest.mark.parametrize(
    'cli_tests_contracts_version',
    [RED_EYES_CONTRACT_VERSION],
    scope='module',
)
pytestmark = pytest.mark.parametrize(
    'environment_type',
    [EXPECTED_DEFAULT_ENVIRONMENT_VALUE],
    scope='module',
)


@pytest.mark.timeout(65)
def test_cli_full_init(cli_args, raiden_spawner):
    child = raiden_spawner(cli_args)
    try:
        # expect the default mode
        expect_cli_normal_startup(child, EXPECTED_DEFAULT_ENVIRONMENT_VALUE)
    except pexpect.TIMEOUT as e:
        print('Timed out at', e)
    finally:
        child.close()


@pytest.mark.timeout(35)
@pytest.mark.parametrize('changed_args', [{'keystore_path': '.'}])
def test_cli_wrong_keystore_path(cli_args, raiden_spawner):
    child = raiden_spawner(cli_args)
    try:
        expect_cli_until_acknowledgment(child)
        child.expect('No Ethereum accounts found in the provided keystore directory')
    except pexpect.TIMEOUT as e:
        print('PEXPECT timed out at', e)
    finally:
        child.close()


@pytest.mark.timeout(35)
@pytest.mark.parametrize('removed_args', [['password_file']])
def test_cli_missing_password_file_enter_password(raiden_testchain, cli_args, raiden_spawner):
    print(cli_args)
    child = raiden_spawner(cli_args)
    try:
        expect_cli_until_acknowledgment(child)
        child.expect('Enter the password to unlock')
        with open(raiden_testchain['password_file'], 'r') as password_file:<commit_msg>Remove a stray print statement<commit_after>import pexpect
import pytest
from eth_utils import to_checksum_address

from raiden.constants import Environment
from raiden.settings import RED_EYES_CONTRACT_VERSION
from raiden.tests.integration.cli.util import (
    expect_cli_normal_startup,
    expect_cli_successful_connected,
    expect_cli_until_acknowledgment,
)

EXPECTED_DEFAULT_ENVIRONMENT_VALUE = Environment.PRODUCTION.value

pytestmark = pytest.mark.parametrize(
    'cli_tests_contracts_version',
    [RED_EYES_CONTRACT_VERSION],
    scope='module',
)
pytestmark = pytest.mark.parametrize(
    'environment_type',
    [EXPECTED_DEFAULT_ENVIRONMENT_VALUE],
    scope='module',
)


@pytest.mark.timeout(65)
def test_cli_full_init(cli_args, raiden_spawner):
    child = raiden_spawner(cli_args)
    try:
        # expect the default mode
        expect_cli_normal_startup(child, EXPECTED_DEFAULT_ENVIRONMENT_VALUE)
    except pexpect.TIMEOUT as e:
        print('Timed out at', e)
    finally:
        child.close()


@pytest.mark.timeout(35)
@pytest.mark.parametrize('changed_args', [{'keystore_path': '.'}])
def test_cli_wrong_keystore_path(cli_args, raiden_spawner):
    child = raiden_spawner(cli_args)
    try:
        expect_cli_until_acknowledgment(child)
        child.expect('No Ethereum accounts found in the provided keystore directory')
    except pexpect.TIMEOUT as e:
        print('PEXPECT timed out at', e)
    finally:
        child.close()


@pytest.mark.timeout(35)
@pytest.mark.parametrize('removed_args', [['password_file']])
def test_cli_missing_password_file_enter_password(raiden_testchain, cli_args, raiden_spawner):
    child = raiden_spawner(cli_args)
    try:
        expect_cli_until_acknowledgment(child)
        child.expect('Enter the password to unlock')
        with open(raiden_testchain['password_file'], 'r') as password_file:
{'fraction_non_alphanumeric': 0.09083622762489982, 'fraction_numerical': 0.0032059845044082286, 'mean_word_length': 4.742331288343558, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 3, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '3395929', 'n_tokens_mistral': 1288, 'n_tokens_neox': 1276, 'n_words': 220}