def test_add_journal(): """ """ erp_dat = load_erp_data() erp_dat.add_journal('Journal name', 'J abbrev') assert erp_dat.journals
def test_add_erp_dat(): """ """ erp_dat = load_erp_data() erp_dat.add_words(['new', 'erp_dat']) assert erp_dat.words
def test_add_title(): """ """ erp_dat = load_erp_data() erp_dat.add_title('title') assert erp_dat.titles
def test_add_authors(): """ """ erp_dat = load_erp_data() erp_dat.add_authors(('Last', 'First', 'IN', 'School')) assert erp_dat.authors
def test_add_id(): """ """ erp_dat = load_erp_data() erp_dat.add_id(1) assert erp_dat.ids
def test_save_n_clear(): """ """ erp_dat = load_erp_data(add_dat=True) erp_dat.save_n_clear() assert erp_dat.n_articles == 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
def test_add_kws(): """ """ erp_dat = load_erp_data() erp_dat.add_kws(['list', 'of', 'kws']) assert erp_dat.kws
def test_increment_n_articles(): """ """ erp_dat = load_erp_data() erp_dat.increment_n_articles() assert erp_dat.n_articles
def test_add_doi(): """ """ erp_dat = load_erp_data() erp_dat.add_doi('doi_str') assert erp_dat.dois
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
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
def test_save(): """ """ tdb = TDB() erp_dat = load_erp_data(add_dat=True) erp_dat.save(tdb) assert True
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
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()
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