예제 #1
0
파일: speech_test.py 프로젝트: joyrexus/ldp
def test_cumulative_word_types():
    '''
    Testing counts of cumulative word types.

    '''
    subject = SubjectReport(125, min_session=10, max_session=11) 
    subject.query() 
    results = subject.results()
    A = results[(125, 10, 'P')]
    B = results[(125, 11, 'P')]
    assert A['word_types_cumulative'] == 326
    assert B['word_types_cumulative'] == 457
예제 #2
0
파일: speech_test.py 프로젝트: joyrexus/ldp
def test_subject_report():
    '''
    Testing the SubjectReport class.
    
    '''
    speech = Report()
    speech.query('subject=125 and session=11')
    A = speech.result(125, 11, "C")

    subject = SubjectReport(125, min_session=10, max_session=11) 
    subject.query()
    results = subject.results()
    B = results[(125, 11, 'C')]
    assert A['word_tokens'] == B['word_tokens']
    assert A['word_types']  == B['word_types']
    assert A['utterances']  == B['utterances']