You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
We have used coverage.py to measure the cover of our chosen project. After installing all tools and dependencies, we have
18
+
run the tool by typing coverage run --branch -m pytest tests. Afterwards, we use coverage report to generate the report. Later, Ayman has written a scrip to run the commands in a single script, and to also skip the test files, which don't need to be tested.
19
+
20
+
In order to not put in 8 large images, I will insert the final screenshot, with the total branch coverage:
the coverage is improved by 28%, the code only hit one of the five branches and cover only one of the three cases of the pythagoras theory. I added the other two cases, i could have a fourth case where none of the cases is present.
The coverage is improved by 13%, the code only hit three out of five branches and only set up two examples. I added a case where there is no unique letter.
288
+
289
+
290
+
Almuthana Almustafa
291
+
292
+
stoogsort in stoog_sort.py
293
+
294
+
[Link to the commit in the founction files](https://github.com/CatalinAnt/algorithms-SEP-95/commit/57b66879c6ae0f82712c55528f540dfdb3c3ddd3)
295
+
296
+
result:
297
+
298
+

299
+
300
+
word_break in word_break.py
301
+
302
+
link to commit in founction:
303
+
[Link to the commit in the founction files](https://github.com/CatalinAnt/algorithms-SEP-95/commit/57b66879c6ae0f82712c55528f540dfdb3c3ddd3)
304
+
305
+
result:
306
+
307
+

308
+
309
+
Almuthana Almustafa
310
+
311
+
stoogsort function
312
+
313
+
link to commit in test files:
314
+
[Link to the commit in the test files](https://github.com/CatalinAnt/algorithms-SEP-95/commit/157de36fd4c373b67cd03e3b3713be9ba5cf0d97)
315
+
316
+
existing tool result before:
317
+
318
+

319
+
320
+
existing tool result after:
321
+
322
+

323
+
324
+
The coverage increased by 89%, largely attributable to the implementation of new tests.
325
+
326
+
word_break function
327
+
328
+
[Link to the commit in the test files](https://github.com/CatalinAnt/algorithms-SEP-95/commit/157de36fd4c373b67cd03e3b3713be9ba5cf0d97)
329
+
330
+
existing tool result before:
331
+
332
+

333
+
334
+
existing tool result after:
335
+
336
+

337
+
338
+
The coverage improved by 86% due to the creation of new tests.
339
+
115
340
### Overall
116
341
117
342
<Provide a screenshot of the old coverage results by running an existing tool (the same as you already showed above)>
0 commit comments