-
Notifications
You must be signed in to change notification settings - Fork 4
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Update support generate-links to symlink ibek and pvi yaml
Make generate_links take a specific support module to link rather than doing glob of all directories.
- Loading branch information
Showing
7 changed files
with
83 additions
and
25 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,21 @@ | ||
"""Unit tests for the support subcommand""" | ||
from pathlib import Path | ||
|
||
from ibek.support_cmds.files import symlink_files | ||
|
||
|
||
def test_symlink_ibek(tmp_path: Path, samples: Path): | ||
symlink_files(samples / "yaml", "*.ibek.support.yaml", tmp_path) | ||
|
||
assert [f.name for f in tmp_path.iterdir()] == [ | ||
"bad_db.ibek.support.yaml", | ||
"objects.ibek.support.yaml", | ||
"utils.ibek.support.yaml", | ||
"all.ibek.support.yaml", | ||
] | ||
|
||
|
||
def test_symlink_pvi(tmp_path: Path, samples: Path): | ||
symlink_files(samples / "yaml", "*.pvi.device.yaml", tmp_path) | ||
|
||
assert [f.name for f in tmp_path.iterdir()] == ["simple.pvi.device.yaml"] |