Skip to content

Commit 46c0854

Browse files
committed
Remove unnecessary message and fix tests
1 parent c1bfec8 commit 46c0854

File tree

2 files changed

+5
-9
lines changed

2 files changed

+5
-9
lines changed

src/manage/aliasutils.py

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -175,7 +175,6 @@ def _create_alias(
175175
# We know that the target either doesn't exist or needs replacing
176176
unlink(p)
177177
try:
178-
LOGGER.debug("Creating %s as hard link to %s", p, launcher2)
179178
_link(launcher2, p)
180179
existing_bytes = launcher_bytes
181180
launcher_remap[launcher.name] = launcher2

tests/test_alias.py

Lines changed: 5 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -129,10 +129,7 @@ def test_write_alias_launcher_missing(fake_config, assert_log, tmp_path):
129129
target=tmp_path / "target.exe",
130130
)
131131
assert_log(
132-
"Checking for launcher.*",
133-
"Checking for launcher.*",
134-
"Checking for launcher.*",
135-
"Create %s linking to %s",
132+
"Create %s for %s using %s, chosen by %s",
136133
assert_log.end_of_log(),
137134
)
138135

@@ -161,7 +158,7 @@ def read_bytes():
161158
target=tmp_path / "target.exe",
162159
)
163160
assert_log(
164-
"Create %s linking to %s",
161+
"Create %s for %s",
165162
"Failed to read launcher template at %s\\.",
166163
"Failed to read %s",
167164
assert_log.end_of_log(),
@@ -184,7 +181,7 @@ def fake_link(x, y):
184181
_link=fake_link
185182
)
186183
assert_log(
187-
"Create %s linking to %s",
184+
"Create %s for %s",
188185
"Searching %s for suitable launcher to link",
189186
"No existing launcher available",
190187
"Created %s as copy of %s",
@@ -219,7 +216,7 @@ def fake_link(x, y):
219216
_link=fake_link
220217
)
221218
assert_log(
222-
"Create %s linking to %s",
219+
"Create %s for %s",
223220
("Created %s as hard link to %s", ("test.exe", "actual_launcher.txt")),
224221
assert_log.end_of_log(),
225222
)
@@ -241,7 +238,7 @@ def test_write_alias_launcher_no_linking(fake_config, assert_log, tmp_path):
241238
_link=None
242239
)
243240
assert_log(
244-
"Create %s linking to %s",
241+
"Create %s for %s",
245242
("Created %s as copy of %s", ("test.exe", "launcher.txt")),
246243
assert_log.end_of_log(),
247244
)

0 commit comments

Comments
 (0)