krmaxwell / maltrieve

A tool to retrieve malware directly from the source for security researchers.
GNU General Public License v3.0
563 stars 183 forks source link

Moar tests for v0.7 #136

Closed krmaxwell closed 9 years ago

krmaxwell commented 9 years ago

Make sure we're testing as much as we can. That code coverage looks low.

krmaxwell commented 9 years ago
$ py.test --cov-report term-missing --cov maltrieve test.py
=============================================================================================== test session starts ===============================================================================================
platform linux2 -- Python 2.7.6 -- py-1.4.26 -- pytest-2.7.0
rootdir: /home/kmaxwell/src/maltrieve, inifile: 
plugins: cov
collected 9 items 

test.py .........
--------------------------------------------------------------------------------- coverage: platform linux2, python 2.7.6-final-0 ---------------------------------------------------------------------------------
Name        Stmts   Miss  Cover   Missing
-----------------------------------------
maltrieve     324    243    25%   46-126, 129-133, 137-242, 246-261, 266-278, 282-297, 301-344, 355, 357, 378-383, 387, 421, 437-440, 451-502, 506-509

============================================================================================ 9 passed in 0.97 seconds =============================================================================================
krmaxwell commented 9 years ago
krmaxwell commented 9 years ago

I may have a regression error, because I know I wrote tests for most of config.__init__() and save_malware().