コード例 #1
0
ファイル: test_loader.py プロジェクト: triplez23/pysipp
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
ファイル: test_loader.py プロジェクト: SIPp/pysipp
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
ファイル: test_loader.py プロジェクト: triplez23/pysipp
def test_scendir_loading(scendir):
    dir_list = list(iter_scen_dirs(scendir))
    assert len(dir_list) == 2  # only dirs with xmls
コード例 #5
0
ファイル: test_loader.py プロジェクト: SIPp/pysipp
def test_scendir_loading(scendir):
    dir_list = list(iter_scen_dirs(scendir))
    assert len(dir_list) == 2  # only dirs with xmls