diff --git a/dzgui/config/convert.py b/dzgui/config/convert.py index 60571a6..c4c886e 100644 --- a/dzgui/config/convert.py +++ b/dzgui/config/convert.py @@ -36,8 +36,8 @@ def rc2json(file: Path) -> str: d = {} ips: list[str] = [] - toggles = ["auto_install", "debug", "fullscreen"] - deprecated = ["staging_dir", "src_path", "steam_path"] + toggles = ["auto_install", "fullscreen"] + deprecated = ["staging_dir", "src_path", "steam_path", "debug", "branch"] while True: tok = lex.get_token() diff --git a/dzgui/util/strings.py b/dzgui/util/strings.py index 5f5956b..afe6c9f 100644 --- a/dzgui/util/strings.py +++ b/dzgui/util/strings.py @@ -161,8 +161,6 @@ label_main_menu = "Main menu" # buttons 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 = ( "Refresh the ping for visible servers.\n" "Available once per unique filter context" ) diff --git a/tests/test_config.py b/tests/test_config.py index a1c1a7a..0cdcb80 100644 --- a/tests/test_config.py +++ b/tests/test_config.py @@ -8,27 +8,29 @@ from tests.fixtures import fixture_path pytestmark = pytest.mark.config + @pytest.fixture def legacy_config(): return fixture_path("dztuirc_one") + @pytest.fixture def keys(): return [ - "bm_api", - "fav_server", - "fav_label", - "name", - "debug", - "branch", - "fullscreen", - "steam_api", - "auto_install", - "default_steam_path", - "client", - "ip_list", - "use_miles" - ] + "bm_api", + "fav_server", + "fav_label", + "name", + "branch", + "fullscreen", + "steam_api", + "auto_install", + "default_steam_path", + "client", + "ip_list", + "use_miles", + ] + @pytest.fixture def config(): @@ -55,16 +57,18 @@ def test_contains_invalid_values(keys, config): assert key in keys -@pytest.mark.parametrize("fixture, expect", [ - ("dztuirc_one", (False, True, True)), - ("dztuirc_two", (False, False, False)), -]) +@pytest.mark.parametrize( + "fixture, expect", + [ + ("dztuirc_one", (False, True, True)), + ("dztuirc_two", (False, False, False)), + ], +) def test_bool_conversion(fixture, expect): fixture = fixture_path(fixture) j = convert.rc2json(fixture) j = json.loads(j) assert j["fullscreen"] == expect[0] - assert j["debug"] == expect[1] assert j["auto_install"] == expect[2] assert not j["use_miles"] @@ -72,8 +76,16 @@ def test_bool_conversion(fixture, expect): def test_key_conversion(legacy_config): j = convert.rc2json(legacy_config) 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: assert key not in j + # TODO: test that when a config file is created from scratch, it contains all values