mirror of
https://github.com/dcs-liberation/dcs_liberation.git
synced 2025-11-10 14:22:26 +00:00
Need to reset the persisted save paths on load, since the file that was loaded may have been moved since it was saved and the original location may no longer be accessible. Fixes https://github.com/dcs-liberation/dcs_liberation/issues/2756.
19 lines
337 B
Python
19 lines
337 B
Python
import datetime
|
|
from typing import cast
|
|
|
|
import pytest
|
|
|
|
from game import Game
|
|
from game.persistence import SaveManager
|
|
|
|
|
|
class StubGame:
|
|
def __init__(self) -> None:
|
|
self.date = datetime.date.min
|
|
self.save_manager = SaveManager(cast(Game, self))
|
|
|
|
|
|
@pytest.fixture
|
|
def game() -> Game:
|
|
return cast(Game, StubGame())
|