Exemple #1
0
df3 = pd.DataFrame(index=tests, columns=builds)

print(f'\n\n{"#"*30} FUZZER MATCHING RESULTS {"#"*30}')
# q = df1.where(df1.test_name == tests[0])
# errorss = list(q.failure.dropna())
# str1 = errorss[0]

for test in tests:
    b = df1.where(df1.test_name == test)
    errors = list(b.failure.dropna())
    str1 = errors[0]
    ratio = []
    for error in errors:
        str2 = error
        try:
            ratio_result = smf.stringMatingRatio(str1, str2)
        except:
            ratio_result = np.nan
        ratio.append((ratio_result))
    ratio = (ratio + [0] * len(builds))[:len(builds)] #padding zeros
    df2.loc[test] = ratio

print(df2)

print(f'\n\n{"#"*30} BASIC STRING MATCHING {"#"*30}')
for test in tests:
    b = df1.where(df1.test_name == test)
    errors = list(b.failure.dropna())
    str1 = errors[0]
    ratio = []
    for error in errors:
Exemple #2
0
import testScript as ts
import string_matching_fuzzer as smf

str1 = "Hi how are you"
str2 = "Hi thiskefbweklvjbljchslkjbasdlkcjbwd this kjhlkjhlkhslkhjkjh"

print(smf.stringMatingRatio(str1, str2))
print(smf.pstringMatingRatio(str1, str2))