add tests for PyLammps to check new exports

This commit is contained in:
Axel Kohlmeyer
2024-06-18 21:13:33 -04:00
parent 19a8313578
commit 2a132dfe8f

View File

@ -119,6 +119,10 @@ class PythonPyLammps(unittest.TestCase):
self.assertEqual(self.pylmp.communication.comm_style,'brick')
self.assertEqual(self.pylmp.communication.comm_layout,'uniform')
self.assertEqual(self.pylmp.communication.nprocs,1)
self.assertEqual(self.pylmp.communication.nthreads,1)
self.assertEqual(self.pylmp.communication.procgrid,[1,1,1])
self.assertEqual(self.pylmp.communication.proc_grid,[1,1,1])
self.assertEqual(self.pylmp.communication.ghost_velocity,0)
self.assertEqual(len(self.pylmp.computes),3)
self.assertEqual(self.pylmp.computes[0]['name'], 'thermo_temp')
self.assertEqual(self.pylmp.computes[0]['style'], 'temp')
@ -137,6 +141,11 @@ class PythonPyLammps(unittest.TestCase):
self.assertEqual(self.pylmp.fixes[0]['group'], 'all')
self.pylmp.group('none','empty')
self.assertEqual(len(self.pylmp.groups),2)
self.pylmp.comm_style('tiled')
self.pylmp.mass('*',1.0)
self.pylmp.run('0','post','no')
self.pylmp.balance(0.1,'rcb')
self.assertEqual(self.pylmp.communication.procgrid,None)
if __name__ == "__main__":
unittest.main()