Example #1
0
def test_rankings():
    # Really should write something deeper than the existing doctests.
    parse = Parse('crimeparse/_input/test')
    parse.crime = 'violent'
    result = parse.get_rankings()
    assert result['crimes']['neighborhood'][0] == ('union-station', {'count': 4, 'rank': 0})
    assert result['crimes']['percapita'][50] == ('harvey-park-south', {'count': 0.0, 'rank': 0})
Example #2
0
def test_rankings():
    # Really should write something deeper than the existing doctests.
    parse = Parse("crimeparse/_input/test")
    parse.crime = "violent"
    result = parse.get_rankings()
    assert result["crimes"]["neighborhood"][0] == ("cbd", {"count": 3, "rank": 0})
    assert result["crimes"]["percapita"][50] == ("harvey-park-south", {"count": 0.0, "rank": 0})
Example #3
0
def test_specific():
    # 
    parse = Parse('crimeparse/_input/test')
    parse.crime = 'violent'
    parse.grep = False
    result = parse.get_specific_crime()
Example #4
0
def test_specific():
    #
    parse = Parse("crimeparse/_input/test")
    parse.crime = "violent"
    parse.grep = False
    result = parse.get_specific_crime()