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

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

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

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

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

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

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

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

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

    erp_dat = load_erp_data()
    erp_dat.add_id(1)

    assert erp_dat.ids
Exemple #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
Exemple #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
Exemple #8
0
def test_add_kws():
    """   """

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

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

    erp_dat = load_erp_data()
    erp_dat.increment_n_articles()

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

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

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

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

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

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

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

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

    assert erp_dat.authors
Exemple #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
Exemple #15
0
def test_add_id():
    """   """

    erp_dat = load_erp_data()
    erp_dat.add_id(1)

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

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

    assert erp_dat.dois
Exemple #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
Exemple #18
0
def test_increment_n_articles():
    """   """

    erp_dat = load_erp_data()
    erp_dat.increment_n_articles()

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

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

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

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

    assert erp_dat.words
Exemple #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
Exemple #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
Exemple #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
Exemple #24
0
def test_save():
    """   """

    tdb = TDB()

    erp_dat = load_erp_data(add_dat=True)

    erp_dat.save(tdb)

    assert True
Exemple #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
Exemple #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
Exemple #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
Exemple #28
0
def test_save():
    """   """

    tdb = TDB()

    erp_dat = load_erp_data(add_dat=True)

    erp_dat.save(tdb)

    assert True
Exemple #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()
Exemple #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()
Exemple #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
Exemple #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