Esempio n. 1
0
def test_no_value_as_list(metplus_config):
    """! Tests that a key with no list of strings returns an empty list."""

    conf_obj = get_config_obj(metplus_config)
    expected_unassigned = []
    unassigned = util.getlist(conf_obj.getstr('config', 'UNASSIGNED_VALUE'))
    assert unassigned == expected_unassigned
Esempio n. 2
0
def test_getlist_begin_end_incr(list_string, output_list):
    assert (util.getlist(list_string) == output_list)
Esempio n. 3
0
def test_getlist_has_commas():
    l = 'gt2.7, >3.6, eq42, "has,commas,in,it"'
    test_list = util.getlist(l)
    assert (test_list == ['gt2.7', '>3.6', 'eq42', 'has,commas,in,it'])
Esempio n. 4
0
def test_getlist_empty():
    l = ''
    test_list = util.getlist(l)
    assert (test_list == [])
Esempio n. 5
0
def test_getlist():
    l = 'gt2.7, >3.6, eq42'
    test_list = util.getlist(l)
    assert (test_list == ['gt2.7', '>3.6', 'eq42'])