testgenie-py 0.2.1__py3-none-any.whl → 0.2.2__py3-none-any.whl
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- testgen/analyzer/random_feedback_analyzer.py +344 -114
- testgen/controller/cli_controller.py +5 -10
- testgen/generated_samplecodebin.py +545 -0
- testgen/generator/code_generator.py +36 -18
- testgen/reinforcement/environment.py +1 -1
- testgen/service/generator_service.py +16 -1
- testgen/service/service.py +124 -32
- testgen/sqlite/db_service.py +22 -2
- testgen/util/coverage_utils.py +35 -0
- testgen/util/randomizer.py +29 -12
- {testgenie_py-0.2.1.dist-info → testgenie_py-0.2.2.dist-info}/METADATA +2 -1
- {testgenie_py-0.2.1.dist-info → testgenie_py-0.2.2.dist-info}/RECORD +14 -28
- testgen/.coverage +0 -0
- testgen/code_to_test/__init__.py +0 -0
- testgen/code_to_test/boolean.py +0 -146
- testgen/code_to_test/calculator.py +0 -29
- testgen/code_to_test/code_to_fuzz.py +0 -234
- testgen/code_to_test/code_to_fuzz_lite.py +0 -397
- testgen/code_to_test/decisions.py +0 -57
- testgen/code_to_test/math_utils.py +0 -47
- testgen/code_to_test/no_types.py +0 -35
- testgen/code_to_test/sample_code_bin.py +0 -141
- testgen/q_table/global_q_table.json +0 -1
- testgen/testgen.db +0 -0
- testgen/tests/__init__.py +0 -0
- testgen/tests/test_boolean.py +0 -69
- testgen/tests/test_decisions.py +0 -195
- {testgenie_py-0.2.1.dist-info → testgenie_py-0.2.2.dist-info}/WHEEL +0 -0
- {testgenie_py-0.2.1.dist-info → testgenie_py-0.2.2.dist-info}/entry_points.txt +0 -0
@@ -1,47 +0,0 @@
|
|
1
|
-
def categorize_number(n: int) -> str:
|
2
|
-
if n < 0:
|
3
|
-
return "negative"
|
4
|
-
elif n == 0:
|
5
|
-
return "zero"
|
6
|
-
elif 0 < n < 10:
|
7
|
-
return "small"
|
8
|
-
elif 10 <= n < 100:
|
9
|
-
return "medium"
|
10
|
-
else:
|
11
|
-
return "large"
|
12
|
-
|
13
|
-
def complex_divide(a: int, b: int) -> float:
|
14
|
-
if b == 0:
|
15
|
-
return float("inf")
|
16
|
-
elif a == 0:
|
17
|
-
return 0.0
|
18
|
-
elif a == b:
|
19
|
-
return 1.0
|
20
|
-
elif a > b:
|
21
|
-
return a / b
|
22
|
-
else:
|
23
|
-
return -1 * (a / b)
|
24
|
-
|
25
|
-
def pos_or_neg(i: int) -> int:
|
26
|
-
if i > 0:
|
27
|
-
sgn = 1
|
28
|
-
else:
|
29
|
-
sgn = -1
|
30
|
-
if sgn > 0:
|
31
|
-
return 1
|
32
|
-
elif sgn < 0:
|
33
|
-
return -1
|
34
|
-
|
35
|
-
def is_even(x: int) -> bool:
|
36
|
-
if x % 2 == 0:
|
37
|
-
return True
|
38
|
-
else:
|
39
|
-
return False
|
40
|
-
|
41
|
-
def is_odd(x: int) -> bool:
|
42
|
-
if x % 2 != 0:
|
43
|
-
return True
|
44
|
-
else:
|
45
|
-
return False
|
46
|
-
|
47
|
-
|
testgen/code_to_test/no_types.py
DELETED
@@ -1,35 +0,0 @@
|
|
1
|
-
def bin_and(a, b):
|
2
|
-
if a == True:
|
3
|
-
if b == True:
|
4
|
-
return True
|
5
|
-
else:
|
6
|
-
return False
|
7
|
-
else:
|
8
|
-
return False
|
9
|
-
|
10
|
-
|
11
|
-
def bin_xor(a, b):
|
12
|
-
if a == True:
|
13
|
-
if b == True:
|
14
|
-
return False
|
15
|
-
else:
|
16
|
-
return True
|
17
|
-
elif b == True:
|
18
|
-
return True
|
19
|
-
else:
|
20
|
-
return False
|
21
|
-
|
22
|
-
|
23
|
-
def status_flags(active, verified, admin):
|
24
|
-
if admin:
|
25
|
-
if verified:
|
26
|
-
return 'admin-verified'
|
27
|
-
else:
|
28
|
-
return 'admin-unverified'
|
29
|
-
elif active:
|
30
|
-
if verified:
|
31
|
-
return 'user-verified'
|
32
|
-
else:
|
33
|
-
return 'user-unverified'
|
34
|
-
else:
|
35
|
-
return 'inactive'
|
@@ -1,141 +0,0 @@
|
|
1
|
-
from typing import List
|
2
|
-
|
3
|
-
class SampleCodeBin:
|
4
|
-
def bin_and(self, a: bool, b: bool) -> bool:
|
5
|
-
"""
|
6
|
-
>>> SampleCodeBin().bin_and(False, False)
|
7
|
-
False
|
8
|
-
"""
|
9
|
-
return a and b
|
10
|
-
|
11
|
-
def bin_or(self, a: bool, b: bool) -> bool:
|
12
|
-
"""
|
13
|
-
>>> SampleCodeBin().bin_or(False, False)
|
14
|
-
False
|
15
|
-
"""
|
16
|
-
return a | b
|
17
|
-
|
18
|
-
def bin_xor(self, a: bool, b: bool) -> bool:
|
19
|
-
"""
|
20
|
-
>>> SampleCodeBin().bin_xor(True, True)
|
21
|
-
False
|
22
|
-
"""
|
23
|
-
return a ^ b
|
24
|
-
|
25
|
-
def bin_nand(self, a: bool, b: bool) -> bool:
|
26
|
-
"""
|
27
|
-
>>> SampleCodeBin().bin_nand(True, False)
|
28
|
-
True
|
29
|
-
"""
|
30
|
-
return not(a and b)
|
31
|
-
|
32
|
-
def bin_nor(self, a: bool, b:bool) -> bool:
|
33
|
-
"""
|
34
|
-
>>> SampleCodeBin().bin_nor(True, False)
|
35
|
-
False
|
36
|
-
"""
|
37
|
-
return not(a | b)
|
38
|
-
|
39
|
-
def mux(self, c1: bool, c2: bool, x0: bool, x1: bool, x2: bool, x3: bool) -> bool:
|
40
|
-
"""
|
41
|
-
>>> SampleCodeBin().mux(True, True, True, False, True, False)
|
42
|
-
True
|
43
|
-
"""
|
44
|
-
return (c1 and c2 and x0) | (c1 and (not(c2)) and x1) | (not(c1) and c2 and x2) | (not(c1) and not(c2) and x3)
|
45
|
-
|
46
|
-
def bin_and_bad(self, a: bool, b: bool) -> bool:
|
47
|
-
"""
|
48
|
-
>>> SampleCodeBin().bin_and_bad(True, True)
|
49
|
-
True
|
50
|
-
>>> SampleCodeBin().bin_and_bad(False, True)
|
51
|
-
True
|
52
|
-
"""
|
53
|
-
if(a == True and b == True):
|
54
|
-
return a and b
|
55
|
-
return a or b
|
56
|
-
|
57
|
-
def bin_or_bad(self, a: bool, b: bool) -> bool:
|
58
|
-
"""
|
59
|
-
>>> SampleCodeBin().bin_or_bad(False, False)
|
60
|
-
True
|
61
|
-
"""
|
62
|
-
return not(a | b)
|
63
|
-
|
64
|
-
"""def bit_converter_excep(self, num: int) -> List[int]:
|
65
|
-
# binary_str: str = bin(num)[2:]
|
66
|
-
bs = bin(num)
|
67
|
-
binary_str = bs[2:]
|
68
|
-
try:
|
69
|
-
return [int(digit) for digit in binary_str]
|
70
|
-
except Exception as e:
|
71
|
-
print(binary_str)
|
72
|
-
print(bs)
|
73
|
-
print(f"Invalid Literal Exception in Bit Converter: {e}")
|
74
|
-
return
|
75
|
-
|
76
|
-
def bit_converter(self, num: int) -> List[int]:
|
77
|
-
binary_str: str = bin(num)[2:]
|
78
|
-
return [int(digit) for digit in binary_str]
|
79
|
-
|
80
|
-
def half_adder(self, a: bool, b: bool) -> tuple:
|
81
|
-
sum: bool = self.bin_xor(a, b)
|
82
|
-
carry: bool = self.bin_and(a, b)
|
83
|
-
return (sum, carry)
|
84
|
-
|
85
|
-
def full_adder(self, a: bool, b: bool, carry_in: bool) -> tuple:
|
86
|
-
sum1, carry = self.half_adder(a, b)
|
87
|
-
sum2, carry_out = self.half_adder(sum1, carry_in)
|
88
|
-
return (sum2, carry or carry_out)
|
89
|
-
|
90
|
-
def thirty_two_bit_adder_excep(self, x: int, y: int) -> List[int]:
|
91
|
-
x_bits: List[int] = self.bit_converter(x)
|
92
|
-
y_bits: List[int] = self.bit_converter(y)
|
93
|
-
result: List[int] = [0] * 32
|
94
|
-
carry: bool = False
|
95
|
-
|
96
|
-
for i in range(32):
|
97
|
-
try:
|
98
|
-
sum_bit, carry = self.full_adder(x_bits[i], y_bits[i], carry)
|
99
|
-
result[i] = sum_bit
|
100
|
-
except IndexError as e:
|
101
|
-
print(f"Index Out of Bounds Error In ThirtyTwoBitAdder: {e}")
|
102
|
-
result = [1] * 32
|
103
|
-
|
104
|
-
if carry:
|
105
|
-
return OverflowError("Sum exceeds 32 bits")
|
106
|
-
|
107
|
-
return result
|
108
|
-
|
109
|
-
def thirty_two_bit_adder(self, x: int, y: int) -> List[int]:
|
110
|
-
print(x.bit_length() - 1)
|
111
|
-
print(y.bit_length() -1)
|
112
|
-
x_bits: List[int] = self.bit_converter(x)
|
113
|
-
y_bits: List[int] = self.bit_converter(y)
|
114
|
-
|
115
|
-
#if(len(x_bits) > 32 or len(y_bits) >= 32):
|
116
|
-
# print(f"Length of bit list greater than 32")
|
117
|
-
|
118
|
-
result: List[int] = [0] * 32
|
119
|
-
carry: bool = False
|
120
|
-
|
121
|
-
for i in range(32):
|
122
|
-
sum_bit, carry = self.full_adder(x_bits[i], y_bits[i], carry)
|
123
|
-
result[i] = sum_bit
|
124
|
-
|
125
|
-
return result
|
126
|
-
|
127
|
-
|
128
|
-
def thirty_two_bit_adder_excep(self, x: int, y: int) -> List[int]:
|
129
|
-
#print(x.bit_length - 1)
|
130
|
-
#peint(x.bit_length - 1)
|
131
|
-
x_bits: List[int] = self.bit_converter(x)
|
132
|
-
y_bits: List[int] = self.bit_converter(y)
|
133
|
-
|
134
|
-
result: List[int] = [0] * 32
|
135
|
-
carry: bool = False
|
136
|
-
|
137
|
-
for i in range(32):
|
138
|
-
sum_bit, carry = self.full_adder(x_bits[i], y_bits[i], carry)
|
139
|
-
result[i] = sum_bit
|
140
|
-
|
141
|
-
return result"""
|
@@ -1 +0,0 @@
|
|
1
|
-
{"(0.0, 0)|add": 1.0147553256632154, "(62.5, 1)|z3": -0.020000000000000004, "(62.5, 3)|add": -0.010000000000000002, "(62.5, 4)|add": 0.18000000000000002, "(87.5, 5)|add": 0.06100000000000001, "(75.0, 1)|add": 0.7892791100000003, "(87.5, 2)|add": 0.3650931000000001, "(87.5, 3)|z3": 0.0, "(87.5, 3)|add": 0.0881, "(87.5, 4)|add": 0.26100000000000007, "(87.5, 2)|remove": -0.09000000000000001, "(62.5, 1)|add": 0.07100000000000001, "(62.5, 2)|add": -0.019000000000000003, "(62.5, 3)|z3": -0.020000000000000004, "(62.5, 5)|add": -0.010000000000000002, "(62.5, 6)|add": -0.010000000000000002, "(62.5, 7)|add": 0.07100000000000001, "(87.5, 8)|add": -0.010000000000000002, "(87.5, 9)|z3": -0.010000000000000002, "(87.5, 3)|remove": -0.09000000000000001, "(62.5, 2)|z3": -0.020900000000000002, "(62.5, 4)|merge": -0.010000000000000002, "(62.5, 5)|merge": -0.010000000000000002, "(62.5, 6)|remove": 0.010000000000000002, "(62.5, 5)|z3": -0.011000000000000001, "(87.5, 3)|merge": 0.08000000000000002, "(62.5, 4)|remove": 0.010000000000000002, "(62.5, 3)|merge": -0.0009999999999999996, "(87.5, 6)|z3": 0.0, "(87.5, 6)|merge": 0.09000000000000001, "(87.5, 2)|z3": -0.0009999999999999996, "(75.0, 1)|z3": 0.10056590000000001, "(60.0, 1)|add": 0.37652963100000003, "(60.0, 2)|add": 0.169, "(70.0, 3)|add": 0.23680000000000007, "(90.0, 4)|add": 0.08319800000000001, "(90.0, 5)|add": 0.1629, "(90.0, 6)|add": 0.07234900000000001, "(90.0, 7)|z3": -0.0046099999999999995, "(90.0, 7)|merge": -0.010000000000000002, "(90.0, 8)|add": -0.019000000000000003, "(0.0, 0)|z3": 0.20518, "(60.0, 4)|add": 0.24390000000000006, "(70.0, 5)|add": -0.010000000000000002, "(70.0, 6)|remove": 0.019000000000000003, "(70.0, 5)|z3": -0.020000000000000004, "(70.0, 7)|add": -0.010000000000000002, "(70.0, 8)|z3": -0.020000000000000004, "(70.0, 10)|add": 0.09000000000000001, "(60.0, 2)|z3": 0.08000000000000002, "(70.0, 4)|add": 0.06100000000000001, "(90.0, 5)|z3": -0.010000000000000002, "(90.0, 6)|z3": -0.0029, "(90.0, 6)|merge": -0.010000000000000002, "(90.0, 7)|add": 0.04390000000000001, "(60.0, 1)|z3": 0.26273490000000005, "(70.0, 5)|merge": -0.009, "(70.0, 5)|remove": -0.08100000000000002, "(80.0, 5)|z3": -0.001104690000000002, "(80.0, 6)|add": 0.18449000000000004, "(80.0, 2)|add": 0.07100000000000001, "(80.0, 3)|add": -0.019000000000000003, "(80.0, 4)|z3": 0.04380000000000001, "(90.0, 8)|z3": -0.010000000000000002, "(90.0, 9)|add": -0.010000000000000002, "(80.0, 3)|remove": -0.13661000000000004, "(90.0, 4)|z3": 0.0, "(90.0, 4)|remove": 0.054200000000000005, "(90.0, 3)|add": 0.18000000000000002, "(90.0, 3)|z3": -0.0072000000000000015, "(80.0, 2)|z3": -0.011900000000000003, "(80.0, 3)|z3": -0.0009999999999999996, "(60.0, 4)|remove": 0.010000000000000002, "(60.0, 3)|add": 0.08710000000000002, "(80.0, 5)|add": 0.079449, "(90.0, 6)|remove": -0.08100000000000002, "(53.84615384615385, 1)|add": 1.2104837900000005, "(76.92307692307693, 2)|remove": -0.09000000000000001, "(61.53846153846154, 1)|add": 0.17100000000000004, "(76.92307692307693, 2)|add": -0.010000000000000002, "(76.92307692307693, 3)|add": 0.171, "(76.92307692307693, 4)|remove": -0.0719, "(76.92307692307693, 3)|z3": 0.0, "(84.61538461538461, 4)|z3": 0.0, "(53.84615384615385, 2)|z3": -0.04000000000000001, "(53.84615384615385, 6)|add": 0.08000000000000002, "(69.23076923076923, 7)|merge": -0.010000000000000002, "(69.23076923076923, 8)|add": 0.15390000000000004, "(76.92307692307693, 9)|add": -0.010000000000000002, "(76.92307692307693, 10)|add": 0.09000000000000001, "(61.53846153846154, 2)|add": -0.010000000000000002, "(61.53846153846154, 3)|add": -0.010000000000000002, "(61.53846153846154, 4)|add": 0.07100000000000001, "(84.61538461538461, 5)|add": -0.010000000000000002, "(84.61538461538461, 6)|add": 0.17100000000000004, "(92.3076923076923, 7)|add": -0.010000000000000002, "(92.3076923076923, 8)|add": -0.010000000000000002, "(69.23076923076923, 2)|add": 0.261, "(69.23076923076923, 3)|merge": -0.010000000000000002, "(69.23076923076923, 4)|add": -0.010000000000000002, "(69.23076923076923, 5)|add": -0.010000000000000002, "(69.23076923076923, 6)|z3": -0.011000000000000001, "(69.23076923076923, 9)|add": -0.010000000000000002, "(69.23076923076923, 2)|z3": -0.030000000000000006, "(69.23076923076923, 5)|remove": 0.019000000000000003, "(69.23076923076923, 4)|z3": -0.030000000000000006, "(69.23076923076923, 7)|add": -0.0029, "(84.61538461538461, 9)|add": 0.09000000000000001, "(92.3076923076923, 10)|add": 0.06100000000000001, "(53.84615384615385, 2)|merge": -0.010000000000000002, "(53.84615384615385, 3)|add": -0.05217031000000001, "(53.84615384615385, 4)|add": 0.08100000000000002, "(69.23076923076923, 4)|remove": 0.020000000000000004, "(69.23076923076923, 3)|add": 0.23471000000000006, "(76.92307692307693, 4)|add": 0.07100000000000001, "(53.84615384615385, 1)|z3": 0.004048379000000005, "(53.84615384615385, 5)|z3": -0.04000000000000001, "(53.84615384615385, 9)|add": 0.09000000000000001, "(69.23076923076923, 10)|add": -0.010000000000000002, "(69.23076923076923, 11)|add": -0.010000000000000002, "(69.23076923076923, 12)|add": -0.010000000000000002, "(76.92307692307693, 2)|z3": 0.09000000000000001, "(84.61538461538461, 3)|add": -0.010000000000000002, "(84.61538461538461, 4)|add": -0.010000000000000002, "(84.61538461538461, 5)|z3": -0.0009999999999999996, "(92.3076923076923, 7)|z3": 0.07100000000000001, "(92.3076923076923, 8)|z3": 0.13290000000000002, "(76.92307692307693, 4)|z3": -0.020000000000000004, "(76.92307692307693, 6)|add": 0.05904900000000002, "(92.3076923076923, 7)|merge": -0.010000000000000002, "(92.3076923076923, 8)|merge": -0.010000000000000002, "(92.3076923076923, 9)|merge": -0.010900000000000002, "(53.84615384615385, 2)|add": 0.0027670000000000142, "(61.53846153846154, 3)|merge": -0.0009999999999999996, "(61.53846153846154, 5)|z3": 0.08000000000000002, "(76.92307692307693, 7)|remove": 0.034390000000000004, "(75.0, 2)|add": -0.010000000000000002, "(75.0, 3)|merge": -0.010000000000000002, "(87.5, 5)|merge": -0.0029, "(100.0, 6)|add": 0.18000000000000002, "(70.0, 3)|z3": 0.10368000000000002, "(70.0, 3)|remove": -0.06632, "(70.0, 4)|merge": -0.0038999999999999994, "(100.0, 8)|add": 0.09000000000000001, "(53.84615384615385, 1)|remove": 0.11934110709000006, "(69.23076923076923, 4)|merge": -0.009, "(69.23076923076923, 7)|z3": -0.030000000000000006, "(69.23076923076923, 6)|remove": 0.010000000000000002, "(69.23076923076923, 9)|z3": -0.030000000000000006, "(84.61538461538461, 10)|add": 0.09000000000000001, "(87.5, 4)|merge": 0.016100000000000007, "(80.0, 4)|merge": -0.004619999999999999, "(69.23076923076923, 3)|z3": 0.09347100000000001, "(69.23076923076923, 5)|z3": -0.0181, "(69.23076923076923, 3)|remove": 0.03347100000000001, "(36.36363636363637, 1)|add": 0.09000000000000001, "(36.36363636363637, 2)|add": -0.010000000000000002, "(54.54545454545454, 5)|z3": 0.06999999999999999, "(54.54545454545454, 6)|merge": -0.010000000000000002, "(54.54545454545454, 8)|z3": -0.020000000000000004, "(72.72727272727273, 5)|z3": 0.010000000000000002, "(72.72727272727273, 8)|z3": -0.030000000000000006, "(81.81818181818183, 9)|add": 0.09000000000000001, "(81.81818181818183, 10)|add": -0.010000000000000002, "(66.66666666666666, 1)|add": 0.18000000000000002, "(100.0, 2)|add": 0.36, "(80.0, 1)|add": 0.27, "(80.0, 1)|z3": 0.009000000000000001, "(100.0, 3)|add": 0.18000000000000002, "(85.71428571428571, 1)|add": 0.09000000000000001, "(63.63636363636363, 1)|add": 0.54, "(81.81818181818183, 2)|add": 0.27, "(81.81818181818183, 4)|z3": 0.06200000000000001, "(90.9090909090909, 5)|add": 0.09000000000000001, "(81.81818181818183, 4)|remove": -0.09000000000000001, "(72.72727272727273, 2)|add": 0.18000000000000002, "(72.72727272727273, 3)|add": -0.019000000000000003, "(72.72727272727273, 7)|z3": -0.038000000000000006, "(63.63636363636363, 2)|add": -0.010000000000000002, "(81.81818181818183, 6)|z3": -0.020000000000000004, "(90.9090909090909, 7)|add": 0.09000000000000001, "(90.9090909090909, 3)|add": 0.09000000000000001, "(90.9090909090909, 4)|add": -0.010000000000000002, "(90.9090909090909, 5)|z3": -0.0009999999999999996, "(81.81818181818183, 3)|add": -0.010000000000000002, "(81.81818181818183, 5)|z3": -0.020000000000000004, "(81.81818181818183, 6)|add": -0.010000000000000002, "(72.72727272727273, 8)|add": -0.010000000000000002, "(37.17277486910995, 1)|add": 0.09000000000000001, "(39.79057591623037, 61)|z3": -0.5, "(53.84615384615385, 3)|z3": 0.0, "(53.84615384615385, 2)|remove": 0.029300000000000007, "(53.84615384615385, 3)|merge": -0.019000000000000003, "(50.0, 1)|add": 0.18000000000000002, "(50.0, 2)|add": -0.04341690000000001, "(50.0, 2)|z3": 0.0, "(50.0, 3)|add": -0.018000000000000002, "(50.0, 3)|z3": 0.0, "(50.0, 4)|add": -0.010000000000000002, "(50.0, 4)|z3": -0.020000000000000004, "(53.84615384615385, 8)|z3": -0.095, "(53.84615384615385, 13)|z3": -0.094, "(53.84615384615385, 14)|add": -0.010000000000000002, "(53.84615384615385, 13)|remove": 0.010000000000000002, "(50.0, 3)|remove": 0.010000000000000002, "(50.0, 2)|remove": 0.010000000000000002, "(50.0, 1)|remove": 0.09629200000000002, "(100.0, 4)|add": 0.09000000000000001, "(80.0, 4)|add": 0.09438000000000002, "(90.0, 9)|merge": -0.010000000000000002, "(76.92307692307693, 5)|add": -0.010000000000000002, "(84.61538461538461, 7)|remove": -0.09000000000000001, "(84.61538461538461, 8)|add": -0.010000000000000002, "(92.3076923076923, 11)|add": -0.010000000000000002, "(55.55555555555556, 1)|add": 0.7200000000000001, "(88.88888888888889, 3)|z3": 0.16000000000000006, "(88.88888888888889, 4)|merge": -0.010000000000000002, "(88.88888888888889, 5)|add": -0.010000000000000002, "(88.88888888888889, 5)|z3": 0.17000000000000007, "(53.84615384615385, 6)|z3": -0.03821000000000001, "(53.84615384615385, 7)|merge": -0.010000000000000002, "(53.84615384615385, 6)|remove": 0.03610000000000001, "(53.84615384615385, 7)|add": -0.027100000000000006, "(53.84615384615385, 12)|z3": -0.1345, "(53.84615384615385, 13)|add": -0.024389999999999995, "(55.55555555555556, 2)|add": -0.05217031000000001, "(88.88888888888889, 4)|z3": 0.16000000000000006, "(77.77777777777779, 3)|remove": -0.09000000000000001, "(77.77777777777779, 4)|add": -0.010000000000000002, "(53.84615384615385, 12)|remove": 0.020000000000000004, "(53.84615384615385, 13)|merge": -0.009, "(88.88888888888889, 4)|add": -0.001999999999999998, "(66.66666666666666, 3)|remove": -0.09000000000000001, "(66.66666666666666, 4)|add": -0.010000000000000002, "(66.66666666666666, 5)|merge": -0.010000000000000002, "(66.66666666666666, 6)|add": -0.010000000000000002, "(92.3076923076923, 9)|add": -0.010000000000000002, "(55.55555555555556, 1)|remove": 0.046, "(55.55555555555556, 3)|add": -0.010000000000000002, "(88.88888888888889, 6)|merge": -0.010000000000000002, "(88.88888888888889, 7)|add": -0.010000000000000002, "(88.88888888888889, 8)|add": -0.010000000000000002, "(53.84615384615385, 11)|remove": 0.010000000000000002, "(53.84615384615385, 10)|remove": 0.010000000000000002, "(53.84615384615385, 9)|remove": 0.019000000000000003, "(53.84615384615385, 10)|add": -0.009, "(88.88888888888889, 5)|merge": 0.007000000000000006, "(53.84615384615385, 7)|z3": -0.05, "(53.84615384615385, 8)|add": -0.010000000000000002, "(53.84615384615385, 7)|remove": 0.010000000000000002, "(53.84615384615385, 5)|remove": 0.010000000000000002, "(55.55555555555556, 4)|z3": -0.05420000000000001, "(55.55555555555556, 5)|add": -0.027100000000000006, "(55.55555555555556, 7)|z3": -0.05320000000000001, "(55.55555555555556, 8)|merge": -0.010000000000000002, "(55.55555555555556, 9)|add": -0.010000000000000002, "(55.55555555555556, 8)|remove": 0.010000000000000002, "(55.55555555555556, 10)|z3": -0.020000000000000004, "(55.55555555555556, 8)|add": -0.009, "(55.55555555555556, 7)|remove": 0.010000000000000002, "(55.55555555555556, 6)|remove": 0.020000000000000004, "(55.55555555555556, 7)|add": -0.009, "(55.55555555555556, 9)|z3": -0.020000000000000004, "(55.55555555555556, 10)|merge": -0.010000000000000002, "(55.55555555555556, 12)|z3": -0.020000000000000004}
|
testgen/testgen.db
DELETED
Binary file
|
testgen/tests/__init__.py
DELETED
File without changes
|
testgen/tests/test_boolean.py
DELETED
@@ -1,69 +0,0 @@
|
|
1
|
-
import pytest
|
2
|
-
|
3
|
-
import testgen.code_to_test.boolean as boolean
|
4
|
-
|
5
|
-
def test_bin_and_0():
|
6
|
-
args = (False, False)
|
7
|
-
expected = False
|
8
|
-
result = boolean.bin_and(*args)
|
9
|
-
assert result == expected
|
10
|
-
|
11
|
-
def test_bin_and_1():
|
12
|
-
args = (True, True)
|
13
|
-
expected = True
|
14
|
-
result = boolean.bin_and(*args)
|
15
|
-
assert result == expected
|
16
|
-
|
17
|
-
def test_bin_and_2():
|
18
|
-
args = (True, False)
|
19
|
-
expected = False
|
20
|
-
result = boolean.bin_and(*args)
|
21
|
-
assert result == expected
|
22
|
-
|
23
|
-
def test_bin_xor_3():
|
24
|
-
args = (True, True)
|
25
|
-
expected = False
|
26
|
-
result = boolean.bin_xor(*args)
|
27
|
-
assert result == expected
|
28
|
-
|
29
|
-
def test_bin_xor_4():
|
30
|
-
args = (True, False)
|
31
|
-
expected = True
|
32
|
-
result = boolean.bin_xor(*args)
|
33
|
-
assert result == expected
|
34
|
-
|
35
|
-
def test_bin_xor_5():
|
36
|
-
args = (False, False)
|
37
|
-
expected = False
|
38
|
-
result = boolean.bin_xor(*args)
|
39
|
-
assert result == expected
|
40
|
-
|
41
|
-
def test_status_flags_6():
|
42
|
-
args = (True, False, True)
|
43
|
-
expected = 'admin-unverified'
|
44
|
-
result = boolean.status_flags(*args)
|
45
|
-
assert result == expected
|
46
|
-
|
47
|
-
def test_status_flags_7():
|
48
|
-
args = (False, False, False)
|
49
|
-
expected = 'inactive'
|
50
|
-
result = boolean.status_flags(*args)
|
51
|
-
assert result == expected
|
52
|
-
|
53
|
-
def test_status_flags_8():
|
54
|
-
args = (True, False, False)
|
55
|
-
expected = 'user-unverified'
|
56
|
-
result = boolean.status_flags(*args)
|
57
|
-
assert result == expected
|
58
|
-
|
59
|
-
def test_status_flags_9():
|
60
|
-
args = (False, True, True)
|
61
|
-
expected = 'admin-verified'
|
62
|
-
result = boolean.status_flags(*args)
|
63
|
-
assert result == expected
|
64
|
-
|
65
|
-
def test_status_flags_10():
|
66
|
-
args = (True, True, False)
|
67
|
-
expected = 'user-verified'
|
68
|
-
result = boolean.status_flags(*args)
|
69
|
-
assert result == expected
|
testgen/tests/test_decisions.py
DELETED
@@ -1,195 +0,0 @@
|
|
1
|
-
import pytest
|
2
|
-
|
3
|
-
import testgen.code_to_test.decisions as decisions
|
4
|
-
|
5
|
-
def test_add_or_subtract_0():
|
6
|
-
args = (12, 71)
|
7
|
-
expected = 83
|
8
|
-
result = decisions.add_or_subtract(*args)
|
9
|
-
assert result == expected
|
10
|
-
|
11
|
-
def test_add_or_subtract_1():
|
12
|
-
args = (7, 81)
|
13
|
-
expected = 88
|
14
|
-
result = decisions.add_or_subtract(*args)
|
15
|
-
assert result == expected
|
16
|
-
|
17
|
-
def test_add_or_subtract_2():
|
18
|
-
args = (97, 75)
|
19
|
-
expected = 22
|
20
|
-
result = decisions.add_or_subtract(*args)
|
21
|
-
assert result == expected
|
22
|
-
|
23
|
-
def test_add_or_subtract_3():
|
24
|
-
args = (38, 40)
|
25
|
-
expected = 78
|
26
|
-
result = decisions.add_or_subtract(*args)
|
27
|
-
assert result == expected
|
28
|
-
|
29
|
-
def test_add_or_subtract_4():
|
30
|
-
args = (66, 3)
|
31
|
-
expected = 63
|
32
|
-
result = decisions.add_or_subtract(*args)
|
33
|
-
assert result == expected
|
34
|
-
|
35
|
-
def test_add_or_subtract_5():
|
36
|
-
args = (84, 10)
|
37
|
-
expected = 74
|
38
|
-
result = decisions.add_or_subtract(*args)
|
39
|
-
assert result == expected
|
40
|
-
|
41
|
-
def test_add_or_subtract_6():
|
42
|
-
args = (95, 89)
|
43
|
-
expected = 6
|
44
|
-
result = decisions.add_or_subtract(*args)
|
45
|
-
assert result == expected
|
46
|
-
|
47
|
-
def test_add_or_subtract_7():
|
48
|
-
args = (57, 12)
|
49
|
-
expected = 45
|
50
|
-
result = decisions.add_or_subtract(*args)
|
51
|
-
assert result == expected
|
52
|
-
|
53
|
-
def test_add_or_subtract_8():
|
54
|
-
args = (64, 98)
|
55
|
-
expected = 162
|
56
|
-
result = decisions.add_or_subtract(*args)
|
57
|
-
assert result == expected
|
58
|
-
|
59
|
-
def test_add_or_subtract_9():
|
60
|
-
args = (94, 80)
|
61
|
-
expected = 14
|
62
|
-
result = decisions.add_or_subtract(*args)
|
63
|
-
assert result == expected
|
64
|
-
|
65
|
-
def test_add_or_subtract_10():
|
66
|
-
args = (26, 3)
|
67
|
-
expected = 23
|
68
|
-
result = decisions.add_or_subtract(*args)
|
69
|
-
assert result == expected
|
70
|
-
|
71
|
-
def test_add_or_subtract_11():
|
72
|
-
args = (91, 39)
|
73
|
-
expected = 52
|
74
|
-
result = decisions.add_or_subtract(*args)
|
75
|
-
assert result == expected
|
76
|
-
|
77
|
-
def test_add_or_subtract_12():
|
78
|
-
args = (53, 42)
|
79
|
-
expected = 11
|
80
|
-
result = decisions.add_or_subtract(*args)
|
81
|
-
assert result == expected
|
82
|
-
|
83
|
-
def test_add_or_subtract_13():
|
84
|
-
args = (15, 42)
|
85
|
-
expected = 57
|
86
|
-
result = decisions.add_or_subtract(*args)
|
87
|
-
assert result == expected
|
88
|
-
|
89
|
-
def test_add_or_subtract_14():
|
90
|
-
args = (13, 67)
|
91
|
-
expected = 80
|
92
|
-
result = decisions.add_or_subtract(*args)
|
93
|
-
assert result == expected
|
94
|
-
|
95
|
-
def test_add_or_subtract_15():
|
96
|
-
args = (62, 92)
|
97
|
-
expected = 154
|
98
|
-
result = decisions.add_or_subtract(*args)
|
99
|
-
assert result == expected
|
100
|
-
|
101
|
-
def test_add_or_subtract_16():
|
102
|
-
args = (91, 2)
|
103
|
-
expected = 89
|
104
|
-
result = decisions.add_or_subtract(*args)
|
105
|
-
assert result == expected
|
106
|
-
|
107
|
-
def test_email_type_17():
|
108
|
-
args = 'abc'
|
109
|
-
expected = 'invalid'
|
110
|
-
result = decisions.email_type(args)
|
111
|
-
assert result == expected
|
112
|
-
|
113
|
-
def test_http_code_18():
|
114
|
-
args = 81
|
115
|
-
expected = 'invalid'
|
116
|
-
result = decisions.http_code(args)
|
117
|
-
assert result == expected
|
118
|
-
|
119
|
-
def test_http_code_19():
|
120
|
-
args = 60
|
121
|
-
expected = 'invalid'
|
122
|
-
result = decisions.http_code(args)
|
123
|
-
assert result == expected
|
124
|
-
|
125
|
-
def test_http_code_20():
|
126
|
-
args = 29
|
127
|
-
expected = 'invalid'
|
128
|
-
result = decisions.http_code(args)
|
129
|
-
assert result == expected
|
130
|
-
|
131
|
-
def test_http_code_21():
|
132
|
-
args = 11
|
133
|
-
expected = 'invalid'
|
134
|
-
result = decisions.http_code(args)
|
135
|
-
assert result == expected
|
136
|
-
|
137
|
-
def test_http_code_22():
|
138
|
-
args = 79
|
139
|
-
expected = 'invalid'
|
140
|
-
result = decisions.http_code(args)
|
141
|
-
assert result == expected
|
142
|
-
|
143
|
-
def test_http_code_23():
|
144
|
-
args = 70
|
145
|
-
expected = 'invalid'
|
146
|
-
result = decisions.http_code(args)
|
147
|
-
assert result == expected
|
148
|
-
|
149
|
-
def test_http_code_24():
|
150
|
-
args = 52
|
151
|
-
expected = 'invalid'
|
152
|
-
result = decisions.http_code(args)
|
153
|
-
assert result == expected
|
154
|
-
|
155
|
-
def test_http_code_25():
|
156
|
-
args = 41
|
157
|
-
expected = 'invalid'
|
158
|
-
result = decisions.http_code(args)
|
159
|
-
assert result == expected
|
160
|
-
|
161
|
-
def test_http_code_26():
|
162
|
-
args = 6
|
163
|
-
expected = 'invalid'
|
164
|
-
result = decisions.http_code(args)
|
165
|
-
assert result == expected
|
166
|
-
|
167
|
-
def test_http_code_27():
|
168
|
-
args = 63
|
169
|
-
expected = 'invalid'
|
170
|
-
result = decisions.http_code(args)
|
171
|
-
assert result == expected
|
172
|
-
|
173
|
-
def test_http_code_28():
|
174
|
-
args = 47
|
175
|
-
expected = 'invalid'
|
176
|
-
result = decisions.http_code(args)
|
177
|
-
assert result == expected
|
178
|
-
|
179
|
-
def test_http_code_29():
|
180
|
-
args = 58
|
181
|
-
expected = 'invalid'
|
182
|
-
result = decisions.http_code(args)
|
183
|
-
assert result == expected
|
184
|
-
|
185
|
-
def test_http_code_30():
|
186
|
-
args = 87
|
187
|
-
expected = 'invalid'
|
188
|
-
result = decisions.http_code(args)
|
189
|
-
assert result == expected
|
190
|
-
|
191
|
-
def test_password_strength_31():
|
192
|
-
args = 'abc'
|
193
|
-
expected = 'weak'
|
194
|
-
result = decisions.password_strength(args)
|
195
|
-
assert result == expected
|
File without changes
|
File without changes
|