Exemple #1
0
def test_get_random_auto_mission_name_does_not_exist(path):
    orig_miz_file = Path(store.get_base_missions_folder(), f'{path}')
    with pytest.raises(RuntimeError):
        store.get_random_auto_mission_name(orig_miz_file)
Exemple #2
0
def test_get_random_auto_mission_name(path):
    orig_miz_file = Path(store.get_base_missions_folder(), f'{path}.miz')
    orig_miz_file.touch()
    random_miz = store.get_random_auto_mission_name(orig_miz_file)
    assert random_miz.parent == store.get_auto_missions_folder()
Exemple #3
0
def test_get_random_auto_mission_name_not_a_miz_file(path):
    orig_miz_file = Path(store.get_base_missions_folder(), f'{path}.not_miz')
    orig_miz_file.touch()
    with pytest.raises(RuntimeError):
        store.get_random_auto_mission_name(orig_miz_file)
Exemple #4
0
def test_get_base_missions_folder():
    path = store.get_base_missions_folder()
    assert isinstance(path, Path)
    assert path.exists()
    assert path.is_dir()