add tests for library interface and python
This commit is contained in:
@ -528,6 +528,16 @@ create_atoms 1 single &
|
||||
self.assertEqual(a[0], x[0]*x[0]+x[1]*x[1]+x[2]*x[2])
|
||||
self.assertEqual(a[1], x[3]*x[3]+x[4]*x[4]+x[5]*x[5])
|
||||
|
||||
def test_expand(self):
|
||||
self.lmp.command("variable one index 1 2 3 4");
|
||||
self.lmp.command("variable two equal 2");
|
||||
self.lmp.command("variable three string three");
|
||||
|
||||
expanded = self.lmp.expand("xx_$(4+5)_$(PI) ${one}-${two}-${three}")
|
||||
self.assertEqual(expanded, "xx_9_3.141592653589793116 1-2-three")
|
||||
expanded = self.lmp.expand("'xx_$(4+5)_$(PI) ${one}-${two}-${three}'")
|
||||
self.assertEqual(expanded, "'xx_$(4+5)_$(PI) ${one}-${two}-${three}'")
|
||||
|
||||
def test_get_thermo(self):
|
||||
self.lmp.command("units lj")
|
||||
self.lmp.command("atom_style atomic")
|
||||
|
||||
Reference in New Issue
Block a user