make lammps_config_has_package() accessible in Python module

This commit is contained in:
Axel Kohlmeyer
2022-10-05 20:14:10 -04:00
parent 8b6c93cb11
commit 0a8dfb73da
2 changed files with 23 additions and 0 deletions

View File

@ -60,6 +60,13 @@ class PythonCapabilities(unittest.TestCase):
for pkg in selected_packages:
self.assertIn(pkg, installed_packages)
def test_has_package(self):
selected_packages = [key[4:] for key in self.cmake_cache.keys() if not key.startswith('PKG_CONFIG') and key.startswith('PKG_') and self.cmake_cache[key]]
self.assertFalse(self.lmp.has_package('XXXXXX'))
for pkg in selected_packages:
self.assertTrue(self.lmp.has_package(pkg))
def test_has_style(self):
self.assertTrue(self.lmp.has_style('pair', 'lj/cut'))
self.assertFalse(self.lmp.has_style('pair', 'lennard_jones'))