Skip to content

Commit

Permalink
add test
Browse files Browse the repository at this point in the history
  • Loading branch information
jaimergp committed Jan 10, 2024
1 parent d1e7362 commit e7d6945
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 2 deletions.
2 changes: 1 addition & 1 deletion tests/data/jsons/sys-prefix.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"$schema": "https://json-schema.org/draft-07/schema",
"$id": "https://schemas.conda.io/menuinst-1.schema.json",
"menu_name": "Sys.Prefix",
"menu_name": "Sys.Prefix {{ DISTRIBUTION_NAME }}",
"menu_items": [
{
"name": "Sys.Prefix",
Expand Down
11 changes: 10 additions & 1 deletion tests/test_api.py
Original file line number Diff line number Diff line change
Expand Up @@ -139,7 +139,16 @@ def check_output_from_shortcut(


def test_install_prefix(delete_files):
check_output_from_shortcut(delete_files, "sys-prefix.json", expected_output=sys.prefix)
_, paths, _ = check_output_from_shortcut(
delete_files, "sys-prefix.json", expected_output=sys.prefix
)
if sys.platform == "win32":
for path in paths:
if path.suffix == ".lnk":
menu_dir = path.parent
assert menu_dir.name == f"Sys.Prefix {Path(sys.prefix).name}"
else:
raise AssertionError("Didn't find .lnk")


def test_precommands(delete_files):
Expand Down

0 comments on commit e7d6945

Please sign in to comment.