<commit_before>#!/usr/bin/env python

"""
PURPOSE: The routines in this file test the get_neighborhoods module.

Created on 2015-04-02T21:24:17
"""

from __future__ import division, print_function
import numpy as np
from types import *
from nose.tools import raises
import pandas as pd

__author__ = "<NAME> (github: @mattgiguere)"
__license__ = "MIT"
__version__ = '0.0.1'
__maintainer__ = "<NAME>"
__email__ = "<EMAIL>"
__status__ = " Development NOT(Prototype or Production)"


#make sure the number of neighborhoods is equal to the number of issues.
def test_get_neighborhoods():
    """
    Ensure
    """

#@raises(ValueError)
#def test_make_function_raise_value_error():


<commit_msg>added test for get_neighborhoods<commit_after>#!/usr/bin/env python

"""
PURPOSE: The routines in this file test the get_neighborhoods module.

Created on 2015-04-02T21:24:17
"""

from __future__ import division, print_function
#import numpy as np
#from types import *
#from nose.tools import raises
#import pandas as pd

import nhrc2.backend.read_seeclickfix_api_to_csv as rscf
from nhrc2.backend import get_neighborhoods as get_ngbrhd

__author__ = "<NAME> (github: @mattgiguere)"
__license__ = "MIT"
__version__ = '0.0.1'
__maintainer__ = "<NAME>"
__email__ = "<EMAIL>"
__status__ = " Development NOT(Prototype or Production)"


#make sure the number of neighborhoods is equal to the number of issues.
def test_get_neighborhoods():
    """
    Ensure the number in the hood list length = the number of issues
    """
    scf_cats = rscf.read_categories(readfile=True)
    issues = rscf.read_issues(scf_cats, readfile=True)

    hoods = get_ngbrhd.get_neighborhoods()
    assert len(issues) == len(hoods)


#@raises(ValueError)
#def test_make_function_raise_value_error():



{'fraction_non_alphanumeric': 0.10005652911249294, 'fraction_numerical': 0.02035048049745619, 'mean_word_length': 5.040955631399317, 'pattern_counts': {'":': 0, '<': 9, '<?xml version=': 0, '>': 9, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 2, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '6178668', 'n_tokens_mistral': 628, 'n_tokens_neox': 587, 'n_words': 176}