Skip to content

Commit 42a3bd3

Browse files
committed
Improve test coverage
1 parent 3e97bf3 commit 42a3bd3

File tree

1 file changed

+22
-0
lines changed

1 file changed

+22
-0
lines changed

tests/test_alias.py

Lines changed: 22 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -224,6 +224,28 @@ def fake_link(x, y):
224224
)
225225

226226

227+
def test_write_alias_launcher_no_linking(fake_config, assert_log, tmp_path):
228+
fake_config.scratch = {
229+
"aliasutils.create_alias.launcher_remap": {"launcher.txt": tmp_path / "actual_launcher.txt"},
230+
}
231+
fake_config.launcher_exe = tmp_path / "launcher.txt"
232+
fake_config.launcher_exe.write_bytes(b'Arbitrary contents')
233+
(tmp_path / "actual_launcher.txt").write_bytes(b'Arbitrary contents')
234+
fake_config.default_platform = '-32'
235+
fake_config.global_dir = tmp_path / "bin"
236+
AU._create_alias(
237+
fake_config,
238+
name="test.exe",
239+
target=tmp_path / "target.exe",
240+
_link=None
241+
)
242+
assert_log(
243+
"Create %s linking to %s",
244+
("Created %s as copy of %s", ("test.exe", "launcher.txt")),
245+
assert_log.end_of_log(),
246+
)
247+
248+
227249
def test_parse_entrypoint_line():
228250
for line, expect in [
229251
("", (None, None, None)),

0 commit comments

Comments
 (0)