fix issues causing failed tests
This commit is contained in:
@ -87,9 +87,9 @@ class command_wrapper:
|
||||
args = list(args)
|
||||
args[0] = lammps(ptr=args[0])
|
||||
x(*args)
|
||||
setattr(__main__, func_name, handler)
|
||||
return func_name
|
||||
return x
|
||||
setattr(__main__, func_name, handler)
|
||||
return func_name
|
||||
return x
|
||||
|
||||
def __getattr__(self, name):
|
||||
"""
|
||||
@ -112,7 +112,7 @@ class command_wrapper:
|
||||
# Python 3.6+ maintains ordering of kwarg keys
|
||||
for kw, arg in kwargs.items():
|
||||
cmd_args.append(kw)
|
||||
if isinstance(arg,bool):
|
||||
if isinstance(arg, bool):
|
||||
cmd_args.append("true" if arg else "false")
|
||||
else:
|
||||
cmd_args.append(str(self._wrap_args(arg)))
|
||||
|
||||
@ -53,7 +53,7 @@ class PythonCmdWrapper(unittest.TestCase):
|
||||
|
||||
types = [1, 1]
|
||||
|
||||
self.assertEqual(self.lmp.create_atoms(2, id=None, type=types, x=x), 2)
|
||||
self.assertEqual(self.lmp.create_atoms(2, atomid=None, atype=types, x=x), 2)
|
||||
self.assertEqual(self.lmp.extract_global("natoms"), 2)
|
||||
pos = self.lmp.numpy.extract_atom("x")
|
||||
self.assertEqual(pos.shape[0], 2)
|
||||
|
||||
Reference in New Issue
Block a user