Files
lutris/tests/_test_wine.py
Daniel Johnson 4d0641e50b Rename the world! All unit tests will start with '_test_' to avoid ambiguity. This means stuff like 'test_config.py' will no longer be loaded as test module.
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.
2026-03-24 09:20:25 -04:00

21 lines
663 B
Python

from unittest import TestCase
from lutris.runners import wine
from lutris.util.test_config import setup_test_environment
setup_test_environment()
class TestDllOverrides(TestCase):
def test_env_format(self):
overrides = {
"d3dcompiler_43": "native,builtin",
"d3dcompiler_47": "native,builtin",
"dnsapi": " builtin",
"dwrite": " disabled",
"winemenubuilder": "disabled",
"rasapi32": " native",
}
env_string = wine.get_overrides_env(overrides)
self.assertEqual(env_string, "d3dcompiler_43,d3dcompiler_47=n,b;dnsapi=b;rasapi32=n;dwrite,winemenubuilder=")