<commit_before>#!/usr/bin/env python3
# Copyright (c) 2017-2018 The Syscoin Core developers
# Distributed under the MIT software license, see the accompanying
# file COPYING or http://www.opensource.org/licenses/mit-license.php.
"""Test RPC calls related to net.

Tests correspond to code in rpc/net.cpp.
"""

from decimal import Decimal

from test_framework.test_framework import SyscoinTestFramework
from test_framework.util import (
    assert_equal,
    assert_greater_than_or_equal,
    assert_greater_than,
    assert_raises_rpc_error,
    connect_nodes,
    p2p_port,
    wait_until,
)
from test_framework.mininode import P2PInterface
from test_framework.messages import (
    CAddress,
    msg_addr,
    NODE_NETWORK,
    NODE_WITNESS,
    NODE_GETUTXO,NODE_BLOOM,
    NODE_NETWORK_LIMITED,
)

def assert_net_servicesnames(servicesflag, servicenames):
    """Utility that checks if all flags are correctly decoded in
    `getpeerinfo` and `getnetworkinfo`.

    :param servicesflag: The services as an integer.
    :param servicesnames: The list of decoded services names, as strings.
    """
    if servicesflag & NODE_NETWORK:<commit_msg>Correct docstring param name.<commit_after>#!/usr/bin/env python3
# Copyright (c) 2017-2018 The Syscoin Core developers
# Distributed under the MIT software license, see the accompanying
# file COPYING or http://www.opensource.org/licenses/mit-license.php.
"""Test RPC calls related to net.

Tests correspond to code in rpc/net.cpp.
"""

from decimal import Decimal

from test_framework.test_framework import SyscoinTestFramework
from test_framework.util import (
    assert_equal,
    assert_greater_than_or_equal,
    assert_greater_than,
    assert_raises_rpc_error,
    connect_nodes,
    p2p_port,
    wait_until,
)
from test_framework.mininode import P2PInterface
from test_framework.messages import (
    CAddress,
    msg_addr,
    NODE_NETWORK,
    NODE_WITNESS,
    NODE_GETUTXO,NODE_BLOOM,
    NODE_NETWORK_LIMITED,
)

def assert_net_servicesnames(servicesflag, servicenames):
    """Utility that checks if all flags are correctly decoded in
    `getpeerinfo` and `getnetworkinfo`.

    :param servicesflag: The services as an integer.
    :param servicenames: The list of decoded services names, as strings.
    """
    if servicesflag & NODE_NETWORK:
{'fraction_non_alphanumeric': 0.07053223712678494, 'fraction_numerical': 0.009519688446559932, 'mean_word_length': 4.314942528735632, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 3, 'https://': 0, 'lorem ipsum': 0, 'www.': 2, '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': '5600086', 'n_tokens_mistral': 740, 'n_tokens_neox': 699, 'n_words': 204}