def work(progress_update: ProgressUpdateCallable):
     pack_iso(
         iso=iso,
         game_files_path=game_files_path,
         disable_attract_if_necessary=True,
         progress_update=progress_update,
     )
Exemple #2
0
def test_pack_iso_invalid_version(mock_validate_game_files_path: MagicMock,
                                  mock_nod: MagicMock,
                                  ):
    # Setup
    game_files_path = MagicMock()
    mock_nod.VERSION = "1.0.0"

    # Run
    with pytest.raises(RuntimeError) as exception:
        iso_packager.pack_iso(None, game_files_path, None, None)

    # Assert
    mock_validate_game_files_path.assert_called_once_with(game_files_path.joinpath.return_value)
    assert str(exception.value) == "Installed nod version (1.0) is older than required 1.1.0"
Exemple #3
0
def pack_iso(output_iso: Path,
             options: Options,
             progress_update: ProgressUpdateCallable,
             ):
    """
    Unpacks the files listed in options to the given path
    :param output_iso:
    :param options:
    :param progress_update:
    :return:
    """
    game_files_path = options.game_files_path

    iso_packager.pack_iso(
        iso=output_iso,
        game_files_path=game_files_path,
        progress_update=progress_update,
    )
 def run():
     iso_packager.pack_iso(iso, game_files_path, progress_update)
Exemple #5
0
 def run():
     iso_packager.pack_iso(iso, game_files_path, disable_attract_if_necessary, progress_update)
 def work(progress_update: ProgressUpdateCallable):
     pack_iso(
         iso=iso,
         game_files_path=game_files_path,
         progress_update=progress_update,
     )