Ejemplo n.º 1
0
def test_set_erps_file():
    """Test the set_erps_file method of Base()."""

    base = load_base()
    base.set_erps_file()

    assert base.erps
Ejemplo n.º 2
0
def test_set_terms_file_dis():
    """Test the set_terms_file method of Base(), for disease files."""

    base = load_base()
    base.set_terms_file('disease')

    assert base.terms
Ejemplo n.º 3
0
def test_set_terms_file_cog():
    """Test the set_terms_file method of Base(), for cognitive files."""

    base = load_base()
    base.set_terms_file('cognitive')

    assert base.terms
Ejemplo n.º 4
0
def test_set_terms():
    """Test the set_terms method of Base."""

    base = load_base()
    base.set_terms(['think', 'do'])

    assert base.terms
Ejemplo n.º 5
0
def test_set_erps():
    """Test the set_erps method of Base()."""

    base = load_base()
    base.set_erps(['N100', 'P100'])

    assert base.erps
Ejemplo n.º 6
0
def test_set_exclusions_file():
    """Test the set_exclusions_file method of Base()."""

    base = load_base(set_erps=True)
    base.set_exclusions_file()

    assert base.exclusions
Ejemplo n.º 7
0
def test_check_exclusions():
    """Test the check_exclusions method of Base()."""

    base = load_base(set_erps=True, set_excl=True)

    base.check_exclusions()

    assert True
Ejemplo n.º 8
0
def test_check_terms():
    """Test the check_terms method of Base()."""

    base = load_base(set_terms='cognitive')

    base.check_terms()

    assert True
Ejemplo n.º 9
0
def test_unload_exclusions():
    """Test unload_exclusions of Base()."""

    base = load_base(set_erps=True, set_excl=True)

    base.unload_exclusions()

    assert not base.exclusions
Ejemplo n.º 10
0
def test_get_db_info():
    """Test the get_db_info method of Base()."""

    base = load_base()

    base.get_db_info('https://eutils.ncbi.nlm.nih.gov/entrez/eutils/einfo.fcgi?db=pubmed')

    assert base.db_info
Ejemplo n.º 11
0
def tests_check_erps():
    """Test the check_erps method of Base()."""

    base = load_base(set_erps=True)

    base.check_erps()

    assert True
Ejemplo n.º 12
0
def test_unload_erps():
    """Test unloading of ERP words."""

    base = load_base(set_erps=True)

    base.unload_erps()

    assert not base.erps
    assert not base.n_erps
Ejemplo n.º 13
0
def test_unload_terms():
    """Test the unload_terms method of Base()."""

    base = load_base(set_terms='disease')

    base.unload_terms()

    assert not base.terms_type
    assert not base.terms
    assert not base.n_terms
Ejemplo n.º 14
0
def tbase_terms():
    return load_base(True, True)
Ejemplo n.º 15
0
def tbase():
    return load_base()
Ejemplo n.º 16
0
def tbase_terms_excl():
    return load_base(True, True)
Ejemplo n.º 17
0
def tbase_empty():
    return load_base()