make dump style yaml test dependent on it being available

This commit is contained in:
Axel Kohlmeyer
2022-04-07 05:59:31 -04:00
parent 3970942028
commit 8a6e6fe523

View File

@ -116,18 +116,18 @@ class AvgChunkFiles(unittest.TestCase):
from lammps import lammps
has_full = False
has_dump_yaml = False
try:
machine=None
if 'LAMMPS_MACHINE_NAME' in os.environ:
machine=os.environ['LAMMPS_MACHINE_NAME']
lmp=lammps(name=machine)
has_full = lmp.has_style("atom","full")
has_dump_yaml = lmp.has_style("atom","full") && lmp.has_style("dump", "yaml")
lmp.close()
except:
pass
@unittest.skipIf(not has_full, "atom_style full is not available")
@unittest.skipIf(not has_dump_yaml, "Either atom_style full or dump_style yaml are not available")
class PythonDump(unittest.TestCase):
def setUp(self):
machine = None