示例#1
0
def test_date_freqquencies():
    test_series = date_series
    print test_series[0].isoformat()
    test_analysis = analyze.dateAnalysis(test_series)
    assert test_analysis["frequencies"] == [('2008-12-20T00:00:00Z', 2),
                                            ('2010-12-23T00:00:00Z', 1),
                                            ('2000-12-22T00:00:00Z', 1)]
def test_date_freqquencies():
    test_series = date_series
    print test_series[0].isoformat()
    test_analysis = analyze.dateAnalysis(test_series)
    assert test_analysis["frequencies"] == [
        ("2008-12-20T00:00:00Z", 2),
        ("2010-12-23T00:00:00Z", 1),
        ("2000-12-22T00:00:00Z", 1),
    ]
示例#3
0
def test_date_unique_count():
    test_series = date_series
    print test_series[0].isoformat()
    test_analysis = analyze.dateAnalysis(test_series)
    assert test_analysis["unique_count"] == 3
示例#4
0
def test_date_median():
    test_series = date_series
    print test_series[0].isoformat()
    test_analysis = analyze.dateAnalysis(test_series)
    assert test_analysis["median"] == "2008-12-20T00:00:00Z"
示例#5
0
def test_date_min():
    test_series = date_series
    print test_series[0].isoformat()
    test_analysis = analyze.dateAnalysis(test_series)
    assert test_analysis["min"] == "2000-12-22T00:00:00Z"
示例#6
0
def test_date_max():
    test_series = date_series
    print test_series[0].isoformat()
    test_analysis = analyze.dateAnalysis(test_series)
    assert test_analysis["max"] == "2010-12-23T00:00:00Z"
示例#7
0
def test_date_invalid_count():
    test_series = date_series
    print test_series[0].isoformat()
    test_analysis = analyze.dateAnalysis(test_series)
    assert test_analysis["invalid"] == 0
示例#8
0
def test_date_mode_count():
    test_series = date_series
    print test_series[0].isoformat()
    test_analysis = analyze.dateAnalysis(test_series)
    assert test_analysis["mode_frequency"] == 2
示例#9
0
def test_date_mode():
    test_series = date_series
    print test_series[0].isoformat()
    test_analysis = analyze.dateAnalysis(test_series)
    assert test_analysis["mode"] == ['2008-12-20T00:00:00Z']
示例#10
0
def test_date_unique_count():
    test_series = date_series
    print test_series[0].isoformat()
    test_analysis = analyze.dateAnalysis(test_series)
    assert test_analysis["unique_count"] == 3
示例#11
0
def test_date_median():
    test_series = date_series
    print test_series[0].isoformat()
    test_analysis = analyze.dateAnalysis(test_series)
    assert test_analysis["median"] == "2008-12-20T00:00:00Z"
示例#12
0
def test_date_min():
    test_series = date_series
    print test_series[0].isoformat()
    test_analysis = analyze.dateAnalysis(test_series)
    assert test_analysis["min"] == "2000-12-22T00:00:00Z"
示例#13
0
def test_date_max():
    test_series = date_series
    print test_series[0].isoformat()
    test_analysis = analyze.dateAnalysis(test_series)
    assert test_analysis["max"] == "2010-12-23T00:00:00Z"
示例#14
0
def test_date_invalid_count():
    test_series = date_series
    print test_series[0].isoformat()
    test_analysis = analyze.dateAnalysis(test_series)
    assert test_analysis["invalid"] == 0
示例#15
0
def test_date_mode_count():
    test_series = date_series
    print test_series[0].isoformat()
    test_analysis = analyze.dateAnalysis(test_series)
    assert test_analysis["mode_frequency"] == 2