From ebf3c180c28e20ad8e5850bcaee168326d9e11a3 Mon Sep 17 00:00:00 2001 From: Richard Berger Date: Mon, 23 Nov 2020 13:43:15 -0500 Subject: [PATCH] Add unit test for extract_global (LAMMPS_DOUBLE) --- unittest/python/python-commands.py | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/unittest/python/python-commands.py b/unittest/python/python-commands.py index ffc846aa8a..4c80e8d227 100644 --- a/unittest/python/python-commands.py +++ b/unittest/python/python-commands.py @@ -267,6 +267,16 @@ create_atoms 1 single & result = self.lmp.get_thermo(key) self.assertEqual(value, result, key) + def test_extract_global_double(self): + self.lmp.command("region box block -1 1 -2 2 -3 3") + self.lmp.command("create_box 1 box") + self.assertEqual(self.lmp.extract_global("boxxlo"), -1.0) + self.assertEqual(self.lmp.extract_global("boxxhi"), 1.0) + self.assertEqual(self.lmp.extract_global("boxylo"), -2.0) + self.assertEqual(self.lmp.extract_global("boxyhi"), 2.0) + self.assertEqual(self.lmp.extract_global("boxzlo"), -3.0) + self.assertEqual(self.lmp.extract_global("boxzhi"), 3.0) + ############################## if __name__ == "__main__": unittest.main()