Skip to content

Commit

Permalink
Add test_semantic_versions
Browse files Browse the repository at this point in the history
  • Loading branch information
jswelling committed Apr 17, 2024
1 parent cefd4e4 commit ac0226c
Showing 1 changed file with 21 additions and 0 deletions.
21 changes: 21 additions & 0 deletions tests/test_semantic_versions.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
import re
import zipfile
from pathlib import Path

import pytest
import semantic_version

from ingest_validation_tools.plugin_validator import validation_class_iter

def test_plugin_semantic_versions():
plugin_dir = (Path(__file__).parent.parent
/ "src" / "ingest_validation_tests")
classnames = []
for cls in validation_class_iter(plugin_dir):
validator = cls(['.'], 'someassay', plugin_dir, [])
try:
ver = semantic_version.Version(cls.version)
except ValueError as excp:
assert False, (f"The plugin {cls.__name__} has version string"
f" {cls.version}, which is not a valid semantic"
" version")

0 comments on commit ac0226c

Please sign in to comment.