<commit_before>"""
Functional test
"""

from nose.tools import *

from mininet.topo import LinearTopo
from mininet.net import Mininet
from mininet.util import dumpNodeConnections
from mininet.log import setLogLevel
from mininet.link import TCLink


def setup():
    print 'SETUP!'


def teardown():
    print 'TEAR DOWN!'


def test_basic():
    """ Pingall a linear topology. """

    net = Mininet(topo=LinearTopo(n=5),
                  link=TCLink)
    net.start()

    print "Dumpingg host connections"
    dumpNodeConnections(net.hosts)

    print "Testing network connectivity"
    net.pingAll()

    net.stop()<commit_msg>Refactor minicps_tests<commit_after>"""
minicps_tests.

Contains functional tests
"""

from mininet.topo import LinearTopo
from mininet.net import Mininet
from mininet.util import dumpNodeConnections
from mininet.link import TCLink


def test_basic():
    """Dump and pingall a linear topology."""

    net = Mininet(topo=LinearTopo(n=5),
                  link=TCLink)
    net.start()

    print "Dumpingg host connections"
    dumpNodeConnections(net.hosts)

    print "Testing network connectivity"
    net.pingAll()

    net.stop()
{'fraction_non_alphanumeric': 0.096137339055794, 'fraction_numerical': 0.0017167381974248926, 'mean_word_length': 3.5546875, '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': '4475534', 'n_tokens_mistral': 385, 'n_tokens_neox': 358, 'n_words': 100}