Update tests

This commit is contained in:
2022-01-29 23:32:38 +07:00
parent a7ddd0c49a
commit 048a7ac9d0
8 changed files with 195 additions and 50 deletions

View File

@ -0,0 +1,39 @@
import constants
from pathlib import Path
class Patcher:
def __init__(self, gamedir=Path.cwd()):
self._gamedir = gamedir
self._patch_url = constants.PATCH_GIT_URL
def override_patch_url(self, url) -> None:
"""
Override the patch url.
:param url: Patch repository url, the url must be a valid git repository.
:return: None
"""
self._patch_url = url
def download_patch(self) -> None:
"""
If `git` exists, this will clone the patch git url and save it to a temporary directory.
Else, this will download the patch from the patch url and save it to a temporary directory. (Not reliable)
:return: None
"""
pass
def apply_patch(self, crash_fix=False) -> None:
"""
Patch the game (and optionally patch the login door crash fix if specified)
:param crash_fix: Whether to patch the login door crash fix or not
:return: None
"""
pass
def revert_patch(self):
"""
Revert the patch (and revert the login door crash fix if patched)
:return: None
"""
pass