Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 6 additions & 1 deletion snakemake_interface_software_deployment_plugins/tests.py
Original file line number Diff line number Diff line change
Expand Up @@ -129,10 +129,15 @@ def test_identity_attributes(self):

def test_source_path_attributes(self):
spec = self.get_env_spec()

def is_source_file_or_none(attr: str) -> bool:
val = getattr(spec, attr)
return val is None or isinstance(val, EnvSpecSourceFile)

assert all(
isinstance(attr, str)
and hasattr(spec, attr)
and isinstance(getattr(spec, attr), (EnvSpecSourceFile, None))
and is_source_file_or_none(attr)
for attr in spec.source_path_attributes()
), "bug in plugin: all source path attributes must be of type EnvSpecSourceFile"

Expand Down