<commit_before>import os
import shutil
from crawler.crawler import ArchiveCrawler

c = ArchiveCrawler()

def crawler_sample_archive_test():
    try:
        c.sample(3)
        print "crawler_sample_archive_test: PASS"
    except Exception as err:
        print err
        print "crawler_sample_archive_test: FAIL"
    
def crawler_get_permissions_test():
    try:
        c.get_permissions()
        print "crawler_get_permissions_test: PASS"
    
    except Exception as err:
        print err
        print "crawler_get_permissions_test: FAIL"
    
def crawler_download_test():
    try:
        c.download()
        print "crawler_download_test: PASS"
        
    except Exception as err:
        print err
        print "crawler_download_test: FAIL"
        
def crawler_test_cleanup():
    
    # delete database
    os.remove("./*.db")
    
    # delete downloaded apks
    shutil.rmtree("./apks/")
    
    print "crawler_test_cleanup: DONE"<commit_msg>fixed cleanup in crawler test<commit_after>import os
import shutil
from crawler.crawler import ArchiveCrawler

c = ArchiveCrawler()

def crawler_sample_archive_test():
    try:
        c.sample(1)
        print "crawler_sample_archive_test: PASS"
    except Exception as err:
        print err
        print "crawler_sample_archive_test: FAIL"
    
def crawler_get_permissions_test():
    try:
        c.get_permissions()
        print "crawler_get_permissions_test: PASS"
    
    except Exception as err:
        print err
        print "crawler_get_permissions_test: FAIL"
    
def crawler_download_test():
    try:
        c.download()
        print "crawler_download_test: PASS"
        
    except Exception as err:
        print err
        print "crawler_download_test: FAIL"
        
def crawler_test_cleanup():
    
    # delete database
    os.remove("apekit.db")
    
    # delete downloaded apks
    shutil.rmtree("apks/")
    
    print "crawler_test_cleanup: DONE"
{'fraction_non_alphanumeric': 0.07367336424523442, 'fraction_numerical': 0.0010303967027305513, 'mean_word_length': 2.5373406193078325, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 3, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 10, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '2720353', 'n_tokens_mistral': 637, 'n_tokens_neox': 623, 'n_words': 143}