Skip to content

Commit

Permalink
Add version_pins tests
Browse files Browse the repository at this point in the history
  • Loading branch information
nanglo123 committed Sep 25, 2024
1 parent a827ba8 commit 7871311
Showing 1 changed file with 23 additions and 0 deletions.
23 changes: 23 additions & 0 deletions tests/test_version_pins.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
# -*- coding: utf-8 -*-

"""Tests for PyOBO VERSION_PINS."""

import unittest

from pyobo.api.utils import get_version
from pyobo.constants import VERSION_PINS


class TestVersionPins(unittest.TestCase):
"""Test using VERSION_PINS."""

def test_correct_version_pin_types(self):
"""Test resource and version type."""
for resource_prefix, version in VERSION_PINS.items():
self.assertIsInstance(resource_prefix, str)
self.assertIsInstance(version, str)

def test_use_correct_version_pin(self):
"""Tests correct resource version is used."""
for resource_prefix, version in VERSION_PINS.items():
self.assertEqual(get_version(resource_prefix), version)

0 comments on commit 7871311

Please sign in to comment.