File tree Expand file tree Collapse file tree 1 file changed +5
-9
lines changed Expand file tree Collapse file tree 1 file changed +5
-9
lines changed Original file line number Diff line number Diff line change @@ -1021,12 +1021,12 @@ def test_handle_add_command_workspace_label_variants(
10211021 assert "./" not in config_data
10221022
10231023
1024- def test_handle_add_command_upgrades_dot_workspace_section (
1024+ def test_handle_add_command_preserves_existing_dot_workspace_section (
10251025 tmp_path : pathlib .Path ,
10261026 monkeypatch : MonkeyPatch ,
10271027 caplog : t .Any ,
10281028) -> None :
1029- """Existing './' sections should be relabeled to their tilde equivalent ."""
1029+ """Existing './' sections should be preserved when they match the workspace ."""
10301030 caplog .set_level (logging .INFO )
10311031
10321032 monkeypatch .setenv ("HOME" , str (tmp_path ))
@@ -1066,13 +1066,9 @@ def test_handle_add_command_upgrades_dot_workspace_section(
10661066
10671067 handle_add_command (args )
10681068
1069- expected_label = "~/study/python/"
1070- assert expected_label in caplog .text
1071-
10721069 with config_file .open (encoding = "utf-8" ) as fh :
10731070 config_data = yaml .safe_load (fh ) or {}
10741071
1075- assert expected_label in config_data
1076- assert "./" not in config_data
1077- assert "existing" in config_data [expected_label ]
1078- assert "pytest-docker" in config_data [expected_label ]
1072+ assert "./" in config_data
1073+ assert "existing" in config_data ["./" ]
1074+ assert "pytest-docker" in config_data ["./" ]
You can’t perform that action at this time.
0 commit comments