-
Notifications
You must be signed in to change notification settings - Fork 13
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
1 changed file
with
23 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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) |