<jupyter_start><jupyter_text>Testes para os inválidos<jupyter_code>filenames = ["inv1.txt", "inv2.txt", "inv3.txt", "inv4.txt", "inv5.txt", "inv6.txt", "inv7.txt", "inv7.txt", "inv7.txt", "inv7.txt", "inv7.txt", "inv7.txt", "inv7.txt", "inv7.txt", "inv7.txt", "inv7.txt", "inv7.txt", "inv7.txt", "inv7.txt", "inv7.txt", "inv7.txt"]
listNum_generations = [100, 100, 100, 100, 100, 100, -1, "word", 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100]
listSize_pop = [10, 10, 10, 10, 10, 10, 10, 10, 1, "word", 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10]
listProb_mut = [0.01, 0.01, 0.01, 0.01, 0.01, 0.01, 0.01, 0.01, 0.01, 0.01, -0.01, 2, "word", 0.01, 0.01, 0.01, 0.01, 0.01, 0.01, 0.01, 0.01]
listProb_cross = [0.9, 0.9, 0.9, 0.9, 0.9, 0.9, 0.9, 0.9, 0.9, 0.9, 0.9, 0.9, 0.9, -0.01, 2, "word", 0.9, 0.9, 0.9, 0.9, 0.9]
listTour_size = [3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 0, "word", 3, 3, 3 ]
listElitism = [0.02, 0.02, 0.02, 0.02, 0.02, 0.02, 0.02, 0.02, 0.02, 0.02, 0.02, 0.02, 0.02, 0.02, 0.02, 0.02, 0.02, 0.02, -0.01, 2, "word"]
def testInvalid(i):
    rnd.seed(500)
    
    global filename, num_generations, size_pop, prob_mut, prob_cross, tour_size, elitism, universe, sets, size_crom

    filename = filenames[i]
    num_generations = listNum_generations[i]
    size_pop = listSize_pop[i]
    prob_mut = listProb_mut[i]
    prob_cross = listProb_cross[i]
    tour_size = listTour_size[i]
    elitism = listElitism[i]

    universe, sets = readFile(filename)
    size_crom = len(sets)

    best = sea(num_generations, size_pop,size_crom,prob_mut,prob_cross,tour_sel(tour_size),one_point_cross,muta_bin,sel_survivors_elite(elitism), fitness,universe,sets)
    displayResult(best)
testInvalid(0)
testInvalid(1)
testInvalid(2)
testInvalid(3)
testInvalid(4)
testInvalid(5)
testInvalid(6)
testInvalid(7)
testInvalid(8)
testInvalid(9)
testInvalid(10)
testInvalid(11)
testInvalid(12)
testInvalid(13)
testInvalid(14)
testInvalid(15)
testInvalid(16)
testInvalid(17)
testInvalid(18)
testInvalid(19)
testInvalid(20)<jupyter_output><empty_output>
{'fraction_non_alphanumeric': 0.19922630560928434, 'fraction_numerical': 0.1590909090909091, 'mean_word_length': 4.4880636604774535, 'pattern_counts': {'":': 0, '<': 5, '<?xml version=': 0, '>': 5, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 6, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'chain_length': '1', 'dir': 'jupyter-structured-clean-dedup', 'id': '612276', 'license': 'MIT', 'n_tokens_mistral': 1190, 'n_tokens_neox': 954, 'n_words': 216, 'path': 'ScriptsForTesting/Black Box/Invalid Inputs/TestsForInvalidInputs.ipynb', 'repo_name': 'ealoticopve/Dynamic-Software-Testing', 'size': '2068'}