def test_file_reader():

    df = main.file_reader(loc, fileNames)
    print(df)

    #assert df is not empty
    assert (len(df) > 0)
Пример #2
0
def test_cluster():

    text = main.file_reader(loc, fileNames)

    (clustered_text, clusters) = main.cluster(text)

    assert (clusters >= 2)
def test_write_summary():

    text = main.file_reader(loc, fileNames)
    (clustered_text, clusters) = main.cluster(text)
    (summary, clusters) = main.summarize_tr(clustered_text, clusters)
    main.write_summary(summary, clusters, 'test')

    assert(os.path.exists('output/cluster_0_test.md'))
def test_summarize_tr():

    text = main.file_reader(loc, fileNames)
    (clustered_text, clusters) = main.cluster(text)

    (summary, clusters) = main.summarize_tr(clustered_text, clusters)

    assert ('Summarized' in summary.columns)