change: drop debug key

This commit is contained in:
aclist committed 2026-05-01 20:32:22 +09:00
1 parent e6d3775fd0
commit 8ec9e5abff
3 files changed
+34 -24

No files matched your search

+2 -2
View File
@@ -36,8 +36,8 @@ def rc2json(file: Path) -> str:
d = {} d = {}
ips: list[str] = [] ips: list[str] = []
toggles = ["auto_install", "debug", "fullscreen"] toggles = ["auto_install", "fullscreen"]
deprecated = ["staging_dir", "src_path", "steam_path"] deprecated = ["staging_dir", "src_path", "steam_path", "debug", "branch"]
while True: while True:
tok = lex.get_token() tok = lex.get_token()
-2
View File
@@ -161,8 +161,6 @@ label_main_menu = "Main menu"
# buttons # buttons
ping_servers = "Ping servers" ping_servers = "Ping servers"
debug_mode = "Debug mode"
debug_tooltip = "Used to perform a dry run without\n" "actually connecting to a server"
ping_tooltip = ( ping_tooltip = (
"Refresh the ping for visible servers.\n" "Available once per unique filter context" "Refresh the ping for visible servers.\n" "Available once per unique filter context"
) )
+32 -20
View File
@@ -8,27 +8,29 @@ from tests.fixtures import fixture_path
pytestmark = pytest.mark.config pytestmark = pytest.mark.config
@pytest.fixture @pytest.fixture
def legacy_config(): def legacy_config():
return fixture_path("dztuirc_one") return fixture_path("dztuirc_one")
@pytest.fixture @pytest.fixture
def keys(): def keys():
return [ return [
"bm_api", "bm_api",
"fav_server", "fav_server",
"fav_label", "fav_label",
"name", "name",
"debug", "branch",
"branch", "fullscreen",
"fullscreen", "steam_api",
"steam_api", "auto_install",
"auto_install", "default_steam_path",
"default_steam_path", "client",
"client", "ip_list",
"ip_list", "use_miles",
"use_miles" ]
]
@pytest.fixture @pytest.fixture
def config(): def config():
@@ -55,16 +57,18 @@ def test_contains_invalid_values(keys, config):
assert key in keys assert key in keys
@pytest.mark.parametrize("fixture, expect", [ @pytest.mark.parametrize(
("dztuirc_one", (False, True, True)), "fixture, expect",
("dztuirc_two", (False, False, False)), [
]) ("dztuirc_one", (False, True, True)),
("dztuirc_two", (False, False, False)),
],
)
def test_bool_conversion(fixture, expect): def test_bool_conversion(fixture, expect):
fixture = fixture_path(fixture) fixture = fixture_path(fixture)
j = convert.rc2json(fixture) j = convert.rc2json(fixture)
j = json.loads(j) j = json.loads(j)
assert j["fullscreen"] == expect[0] assert j["fullscreen"] == expect[0]
assert j["debug"] == expect[1]
assert j["auto_install"] == expect[2] assert j["auto_install"] == expect[2]
assert not j["use_miles"] assert not j["use_miles"]
@@ -72,8 +76,16 @@ def test_bool_conversion(fixture, expect):
def test_key_conversion(legacy_config): def test_key_conversion(legacy_config):
j = convert.rc2json(legacy_config) j = convert.rc2json(legacy_config)
j = json.loads(j) j = json.loads(j)
keys = ["api_key", "staging_dir", "src_path", "steam_path", "preferred_client"] keys = [
"api_key",
"staging_dir",
"src_path",
"steam_path",
"preferred_client",
"debug",
]
for key in keys: for key in keys:
assert key not in j assert key not in j
# TODO: test that when a config file is created from scratch, it contains all values # TODO: test that when a config file is created from scratch, it contains all values