Пример #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)]
Пример #2
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),
    ]
Пример #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