Beispiel #1
0
def test_add_journal():
    """   """

    erp_dat = load_erp_data()
    erp_dat.add_journal('Journal name', 'J abbrev')

    assert erp_dat.journals
Beispiel #2
0
def test_add_erp_dat():
    """   """

    erp_dat = load_erp_data()
    erp_dat.add_words(['new', 'erp_dat'])

    assert erp_dat.words
Beispiel #3
0
def test_add_title():
    """   """

    erp_dat = load_erp_data()
    erp_dat.add_title('title')

    assert erp_dat.titles
Beispiel #4
0
def test_add_authors():
    """   """

    erp_dat = load_erp_data()
    erp_dat.add_authors(('Last', 'First', 'IN', 'School'))

    assert erp_dat.authors
Beispiel #5
0
def test_add_id():
    """   """

    erp_dat = load_erp_data()
    erp_dat.add_id(1)

    assert erp_dat.ids
Beispiel #6
0
def test_save_n_clear():
    """   """

    erp_dat = load_erp_data(add_dat=True)
    erp_dat.save_n_clear()

    assert erp_dat.n_articles == 0
Beispiel #7
0
def test_clear():
    """   """

    erp_dat = load_erp_data(add_dat=True)
    erp_dat.clear()
    erp_dat.check_results()
    assert erp_dat.n_articles == 0
Beispiel #8
0
def test_add_kws():
    """   """

    erp_dat = load_erp_data()
    erp_dat.add_kws(['list', 'of', 'kws'])

    assert erp_dat.kws
Beispiel #9
0
def test_increment_n_articles():
    """   """

    erp_dat = load_erp_data()
    erp_dat.increment_n_articles()

    assert erp_dat.n_articles
Beispiel #10
0
def test_add_kws():
    """   """

    erp_dat = load_erp_data()
    erp_dat.add_kws(['list', 'of', 'kws'])

    assert erp_dat.kws
Beispiel #11
0
def test_add_journal():
    """   """

    erp_dat = load_erp_data()
    erp_dat.add_journal('Journal name', 'J abbrev')

    assert erp_dat.journals
Beispiel #12
0
def test_add_title():
    """   """

    erp_dat = load_erp_data()
    erp_dat.add_title('title')

    assert erp_dat.titles
Beispiel #13
0
def test_add_authors():
    """   """

    erp_dat = load_erp_data()
    erp_dat.add_authors(('Last', 'First', 'IN', 'School'))

    assert erp_dat.authors
Beispiel #14
0
def test_save_n_clear():
    """   """

    erp_dat = load_erp_data(add_dat=True)
    erp_dat.save_n_clear()

    assert erp_dat.n_articles == 0
Beispiel #15
0
def test_add_id():
    """   """

    erp_dat = load_erp_data()
    erp_dat.add_id(1)

    assert erp_dat.ids
Beispiel #16
0
def test_add_doi():
    """   """

    erp_dat = load_erp_data()
    erp_dat.add_doi('doi_str')

    assert erp_dat.dois
Beispiel #17
0
def test_clear():
    """   """

    erp_dat = load_erp_data(add_dat=True)
    erp_dat.clear()
    erp_dat.check_results()
    assert erp_dat.n_articles == 0
Beispiel #18
0
def test_increment_n_articles():
    """   """

    erp_dat = load_erp_data()
    erp_dat.increment_n_articles()

    assert erp_dat.n_articles
Beispiel #19
0
def test_add_doi():
    """   """

    erp_dat = load_erp_data()
    erp_dat.add_doi('doi_str')

    assert erp_dat.dois
Beispiel #20
0
def test_add_erp_dat():
    """   """

    erp_dat = load_erp_data()
    erp_dat.add_words(['new', 'erp_dat'])

    assert erp_dat.words
Beispiel #21
0
def test_add_pub_date():
    """   """

    erp_dat = load_erp_data()
    erp_dat.add_pub_date((2000, 'Feb'))

    assert erp_dat.years
    assert erp_dat.months
Beispiel #22
0
def test_add_pub_date():
    """   """

    erp_dat = load_erp_data()
    erp_dat.add_pub_date((2000, 'Feb'))

    assert erp_dat.years
    assert erp_dat.months
Beispiel #23
0
def test_check_funcs():
    """   """

    erp_dat = load_erp_data(add_dat=True, n=2)
    erp_dat_all = ERPDataAll(erp_dat)

    erp_dat_all.check_words(2)
    erp_dat_all.check_kws(2)

    assert True
Beispiel #24
0
def test_save():
    """   """

    tdb = TDB()

    erp_dat = load_erp_data(add_dat=True)

    erp_dat.save(tdb)

    assert True
Beispiel #25
0
def test_erp_data_all():
    """
    Note: Constructor calls (& implicitly tests) the combine & create_freq funcs.
    """

    erp_dat = load_erp_data(add_dat=True, n=2)

    erp_dat_all = ERPDataAll(erp_dat)

    assert erp_dat_all
Beispiel #26
0
def test_check_funcs():
    """   """

    erp_dat = load_erp_data(add_dat=True, n=2)
    erp_dat_all = ERPDataAll(erp_dat)

    erp_dat_all.check_words(2)
    erp_dat_all.check_kws(2)

    assert True
Beispiel #27
0
def test_erp_data_all():
    """
    Note: Constructor calls (& implicitly tests) the combine & create_freq funcs.
    """

    erp_dat = load_erp_data(add_dat=True, n=2)

    erp_dat_all = ERPDataAll(erp_dat)

    assert erp_dat_all
Beispiel #28
0
def test_save():
    """   """

    tdb = TDB()

    erp_dat = load_erp_data(add_dat=True)

    erp_dat.save(tdb)

    assert True
Beispiel #29
0
def test_check_results():
    """   """

    erp_dat = load_erp_data(add_dat=True)

    erp_dat.check_results()

    erp_dat.n_articles += 1

    with raises(InconsistentDataError):
        assert erp_dat.check_results()
Beispiel #30
0
def test_check_results():
    """   """

    erp_dat = load_erp_data(add_dat=True)

    erp_dat.check_results()

    erp_dat.n_articles += 1

    with raises(InconsistentDataError):
        assert erp_dat.check_results()
Beispiel #31
0
def test_create_print_summary():
    """   """

    erp_dat = load_erp_data(add_dat=True, n=2)
    erp_dat_all = ERPDataAll(erp_dat)

    erp_dat_all.create_summary()

    assert erp_dat_all.summary

    erp_dat_all.print_summary()

    assert True
Beispiel #32
0
def test_create_print_summary():
    """   """

    erp_dat = load_erp_data(add_dat=True, n=2)
    erp_dat_all = ERPDataAll(erp_dat)

    erp_dat_all.create_summary()

    assert erp_dat_all.summary

    erp_dat_all.print_summary()

    assert True