<commit_before>import sys
sys.path.append('../config')
sys.path.append('../src/graph')
sys.path.append('../src/util')
sys.path.append('../src/connectedSubgraph')

from networkParams import MESSAGE_DELIMITER
from graph import Graph
from task import Task
from extendSubgraph import ExtendSubgraph

def testExtendSubgraph():
    graph = Graph(5,5,[(0,1),(1,2),(2,3),(3,4),(4,0)])
    extender = ExtendSubgraph(graph, 101, 3)
    task = Task([0,1,1,0,0],[3, 4],0,0)
    newTasks = extender.generateNewTasks(task)
    for task in newTasks:
        print task.vertices, task.edges

if __name__ == '__main__':
    testExtendSubgraph()<commit_msg>Extend graph subroutine tested!<commit_after>import sys
sys.path.append('../config')
sys.path.append('../src/graph')
sys.path.append('../src/util')
sys.path.append('../src/connectedSubgraph')

from networkParams import MESSAGE_DELIMITER
from graph import Graph
from task import Task
from extendSubgraph import ExtendSubgraph

def testExtendSubgraph1():
    graph = Graph(5,5,[(0,1),(1,2),(2,3),(3,4),(4,0)])
    extender = ExtendSubgraph(graph, 101, 3)
    task = Task([0,1,1,0,0],[0,3],0,0)
    newTasks = extender.generateNewTasks(task)
    for task in newTasks:
        print task.vertices, task.edges

def testExtendSubgraph2():
    graph = Graph(3,2,[(0,1),(1,2)])
    extender = ExtendSubgraph(graph, 101, 3)
    task = Task([1,1,1], [], 0, 0)
    newTasks = extender.generateNewTasks(task)
    for task in newTasks:
        print task.vertices, task.edges

def testExtendSubgraph3():
    graph = Graph(3,3,[(0,1),(1,2),(0,2)])
    extender = ExtendSubgraph(graph, 101, 3)
    task = Task([1,1,1], [1], 0, 0)
    newTasks = extender.generateNewTasks(task)
    for task in newTasks:
        print task.vertices, task.edges

if __name__ == '__main__':
    testExtendSubgraph1()
    testExtendSubgraph2()
    testExtendSubgraph3()
{'fraction_non_alphanumeric': 0.16292735042735043, 'fraction_numerical': 0.04754273504273504, 'mean_word_length': 4.336182336182336, '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': '1523280', 'n_tokens_mistral': 710, 'n_tokens_neox': 675, 'n_words': 138}