Skip to content

Commit

Permalink
More changes to please flake8
Browse files Browse the repository at this point in the history
  • Loading branch information
jswelling committed May 2, 2024
1 parent d07800c commit 6d38f08
Showing 1 changed file with 3 additions and 5 deletions.
8 changes: 3 additions & 5 deletions tests/test_semantic_versions.py
Original file line number Diff line number Diff line change
@@ -1,23 +1,21 @@
import re
import zipfile
from pathlib import Path

import pytest
import pytest #noqa: F401
import semantic_version

from ingest_validation_tools.plugin_validator import validation_class_iter

FALLBACK_REGEX = r"^\d+\.\d+$"


def test_plugin_semantic_versions():
plugin_dir = (Path(__file__).parent.parent
/ "src" / "ingest_validation_tests")
classnames = []
fb_regex = re.compile(FALLBACK_REGEX)
for cls in validation_class_iter(plugin_dir):
validator = cls(['.'], 'someassay', plugin_dir, [])
try:
ver = semantic_version.Version(cls.version)
_ = semantic_version.Version(cls.version)
except ValueError:
if not fb_regex.match(cls.version):
assert False, (f"The plugin {cls.__name__} has version string"
Expand Down

0 comments on commit 6d38f08

Please sign in to comment.