from pathlib import Path
from testaid.pathlist import PathList


def test_testaid_unit_pathlist_roles_blacklist(testvars_roles_blacklist):
    assert testvars_roles_blacklist is not None


def test_testaid_unit_pathlist_roles_whitelist(testvars_roles_whitelist):
    assert testvars_roles_whitelist is not None


def test_testaid_unit_pathlist_get(tmp_path):
    msd = tmp_path / 'molecule_scenario_directory'
    dir1 = msd / 'dir1'
    dir1.mkdir(parents=True)
    dir2 = tmp_path / 'dir2'
    dir2.mkdir()
    file1 = dir1 / 'file1.yml'
    file1.touch()
    file2 = dir1 / 'file2.yml'
    file2.touch()
    file3 = dir2 / 'file3.yml'
    file3.touch()
    my_pathlist = [Path(file3), Path(file1), Path(file2)]
    my_pathstring = 'dir1:../dir2/file3.yml'
    pathlist = PathList(my_pathstring, msd)
    assert pathlist.get() == my_pathlist

[((27, 15, 27, 43), 'testaid.pathlist.PathList', 'PathList', ({(27, 24, 27, 37): 'my_pathstring', (27, 39, 27, 42): 'msd'}, {}), '(my_pathstring, msd)', False, 'from testaid.pathlist import PathList\n'), ((25, 19, 25, 30), 'pathlib.Path', 'Path', ({(25, 24, 25, 29): 'file3'}, {}), '(file3)', False, 'from pathlib import Path\n'), ((25, 32, 25, 43), 'pathlib.Path', 'Path', ({(25, 37, 25, 42): 'file1'}, {}), '(file1)', False, 'from pathlib import Path\n'), ((25, 45, 25, 56), 'pathlib.Path', 'Path', ({(25, 50, 25, 55): 'file2'}, {}), '(file2)', False, 'from pathlib import Path\n')]