mirror of
https://github.com/lutris/lutris.git
synced 2026-06-17 18:29:58 -04:00
This means that very module must be explicitly loaded by various tests that need the 'gi.requires_versions' part- they no longer sometimes get this by accident (sometimes). In turn, _test_cloud_save_progress will no longer stub stuff in sys.modules, which is awful- it breaks later tests. That in turns makes it much chattier since it now actually logs stuff. But it seems to pass for all that. Yikes! Resolves #6570 Much research and drudgery done by Claude Code 🤖 before it clocked out.
25 lines
915 B
Python
25 lines
915 B
Python
from unittest import TestCase
|
|
from unittest.mock import patch
|
|
|
|
from lutris.config import LutrisConfig
|
|
from lutris.runners.runner import Runner
|
|
from lutris.runners.scummvm import scummvm
|
|
from lutris.util.test_config import setup_test_environment
|
|
|
|
setup_test_environment()
|
|
|
|
|
|
class TestScummvm(TestCase):
|
|
def test_custom_data_dir(self):
|
|
scummvm_runner = scummvm()
|
|
scummvm_runner.config = LutrisConfig()
|
|
scummvm_runner.config.runner_config["datadir"] = "~/custom/scummvm"
|
|
|
|
with patch.object(Runner, "get_command", return_value=["scummvm"]):
|
|
self.assertEqual(scummvm_runner.get_scummvm_data_dir(), "~/custom/scummvm")
|
|
self.assertEqual(scummvm_runner.get_command()[1], "--extrapath=~/custom/scummvm")
|
|
|
|
def test_no_executable(self):
|
|
with patch.object(Runner, "get_command", return_value=[]):
|
|
self.assertEqual(scummvm().get_command(), [])
|