示例#1
0
def test_iter_dirs(scendir):
    paths = {
        "default": [True, False],
        "default_with_confpy": [True, True],
        "just_confpy": [False, True],
    }
    for path, xmls, confpy in iter_scen_dirs(scendir):
        expect = paths.get(os.path.basename(path), None)
        if expect:
            assert [bool(xmls), bool(confpy)] == expect
示例#2
0
def test_iter_dirs(scendir):
    paths = {
        'default': [True, False],
        'default_with_confpy': [True, True],
        'just_confpy': [False, True],
    }
    for path, xmls, confpy in iter_scen_dirs(scendir):
        expect = paths.get(os.path.basename(path), None)
        if expect:
            assert [bool(xmls), bool(confpy)] == expect
示例#3
0
def test_iter_dirs(scendir):
    paths = {
        'default': [True, False],
        'default_with_confpy': [True, True],
        'just_confpy': [False, True],
    }
    for path, xmls, confpy in iter_scen_dirs(scendir):
        expect = paths.get(os.path.basename(path), None)
        if expect:
            assert map(bool, (xmls, confpy)) == expect
示例#4
0
def test_scendir_loading(scendir):
    dir_list = list(iter_scen_dirs(scendir))
    assert len(dir_list) == 2  # only dirs with xmls
示例#5
0
def test_scendir_loading(scendir):
    dir_list = list(iter_scen_dirs(scendir))
    assert len(dir_list) == 2  # only dirs with xmls