Skip to content
Snippets Groups Projects
Unverified Commit ee7f24e8 authored by Xavier Robin's avatar Xavier Robin
Browse files

test: warn about outdated or missing libs

parent 3b365bcf
No related branches found
No related tags found
No related merge requests found
...@@ -3,6 +3,7 @@ import ost ...@@ -3,6 +3,7 @@ import ost
from ost import conop from ost import conop
import subprocess import subprocess
import tempfile import tempfile
import warnings
class TestCompLib(unittest.TestCase): class TestCompLib(unittest.TestCase):
...@@ -43,6 +44,15 @@ class TestCompLib(unittest.TestCase): ...@@ -43,6 +44,15 @@ class TestCompLib(unittest.TestCase):
self.assertTrue(comp_nh4.atom_specs[0].charge == 1) self.assertTrue(comp_nh4.atom_specs[0].charge == 1)
self.assertTrue(comp_nh4.atom_specs[1].charge == 0) self.assertTrue(comp_nh4.atom_specs[1].charge == 0)
def test_default_lib_version(self):
compound_lib = conop.GetDefaultLib()
if compound_lib is None:
warnings.warn("Compound library not available. Some functionality may not work as expected.")
else:
lib_version = compound_lib.GetOSTVersionUsed()
if lib_version < ost.__version__:
warnings.warn("Using old version of the compound library: %s" % lib_version)
if __name__ == "__main__": if __name__ == "__main__":
from ost import testutils from ost import testutils
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment