mirror of
https://github.com/MillironX/nf-core_modules.git
synced 2025-01-03 04:52:09 -05:00
Cover case when processes have been imported under different name (#744)
Co-authored-by: Harshil Patel <drpatelh@users.noreply.github.com>
This commit is contained in:
parent
3d0b873584
commit
d73a988ff7
1 changed files with 3 additions and 5 deletions
|
@ -25,14 +25,12 @@ def test_ensure_valid_version_yml(workflow_dir):
|
||||||
|
|
||||||
assert (
|
assert (
|
||||||
"END_VERSIONS" not in versions_yml
|
"END_VERSIONS" not in versions_yml
|
||||||
), "END_VERSIONS detected in versions.yml. END_VERSIONS being in the text is a sign of an ill-formatted HEREDOC"
|
), "END_VERSIONS detected in versions.yml. This is a sign of an ill-formatted HEREDOC"
|
||||||
|
|
||||||
# Raises an exception if yaml is not valid
|
# Raises an exception if yaml is not valid
|
||||||
versions = yaml.safe_load(versions_yml)
|
versions = yaml.safe_load(versions_yml)
|
||||||
try:
|
assert len(versions) == 1, "The top-level of versions.yml must contain exactely one entry: the process name as dict key"
|
||||||
software_versions = versions[software_name.upper()]
|
software_versions = next(iter(versions.values()))
|
||||||
except KeyError:
|
|
||||||
raise AssertionError("There is no entry `<SOFTWARE>` in versions.yml. ")
|
|
||||||
assert len(software_versions), "There must be at least one version emitted."
|
assert len(software_versions), "There must be at least one version emitted."
|
||||||
for tool, version in software_versions.items():
|
for tool, version in software_versions.items():
|
||||||
assert re.match(
|
assert re.match(
|
||||||
|
|
Loading…
Reference in a new issue