Code Duplication    Length = 16-16 lines in 2 locations

tests/fuzz/fuzz_test_fingerprint.py 2 locations

@@ 134-149 (lines=16) @@
131
                    self.fail('Exception "{}" thrown by {} for word: {}'
132
                              .format(inst, algo, fuzzed))
133
134
    def fuzz_test_100pct(self):
135
        """Fuzz test fingerprint algorithms against 100% fuzzed words."""
136
        for _ in range(self.reps):
137
            fuzzed = fuzz(random.choice(self.basewords), fuzziness=1)
138
139
            if EXTREME_TEST:
140
                algs = list(algorithms.keys())
141
            else:
142
                algs = random.choices(list(algorithms.keys()), k=5)
143
144
            for algo in algs:
145
                try:
146
                    algorithms[algo](fuzzed)
147
                except Exception as inst:
148
                    self.fail('Exception "{}" thrown by {} for word: {}'
149
                              .format(inst, algo, fuzzed))
150
151
    def fuzz_test_fuzz_bmp(self):
152
        """Fuzz test fingerprint algorithms against BMP fuzz."""
@@ 117-132 (lines=16) @@
114
                    self.fail('Exception "{}" thrown by {} for word: {}'
115
                              .format(inst, algo, word))
116
117
    def fuzz_test_20pct(self):
118
        """Fuzz test fingerprint algorithms against 20% fuzzed words."""
119
        for _ in range(self.reps):
120
            fuzzed = fuzz(random.choice(self.basewords), fuzziness=0.2)
121
122
            if EXTREME_TEST:
123
                algs = list(algorithms.keys())
124
            else:
125
                algs = random.choices(list(algorithms.keys()), k=5)
126
127
            for algo in algs:
128
                try:
129
                    algorithms[algo](fuzzed)
130
                except Exception as inst:
131
                    self.fail('Exception "{}" thrown by {} for word: {}'
132
                              .format(inst, algo, fuzzed))
133
134
    def fuzz_test_100pct(self):
135
        """Fuzz test fingerprint algorithms against 100% fuzzed words."""