3
0
mirror of https://github.com/triqs/dft_tools synced 2024-11-07 06:33:48 +01:00

BlockStructure: update test

This commit is contained in:
Gernot J. Kraberger 2018-02-27 17:45:25 +01:00
parent 7e82b3eee5
commit 3dbc360173
2 changed files with 5 additions and 4 deletions

View File

@ -376,10 +376,10 @@ class BlockStructure(object):
if not compare(x,y): if not compare(x,y):
return False return False
return True return True
elif isinstance(one,int): elif isinstance(one,(int,bool, str, np.bool_)):
return one==two
elif isinstance(one,str):
return one==two return one==two
elif isinstance(one,np.ndarray):
return np.all(one==two)
elif isinstance(one,dict): elif isinstance(one,dict):
if set(one.keys()) != set(two.keys()): if set(one.keys()) != set(two.keys()):
return False return False
@ -391,7 +391,8 @@ class BlockStructure(object):
return False return False
for prop in [ "gf_struct_sumk", "gf_struct_solver", for prop in [ "gf_struct_sumk", "gf_struct_solver",
"solver_to_sumk", "sumk_to_solver", "solver_to_sumk_block"]: "solver_to_sumk", "sumk_to_solver", "solver_to_sumk_block",
"deg_shells"]:
if not compare(getattr(self,prop),getattr(other,prop)): if not compare(getattr(self,prop),getattr(other,prop)):
return False return False
return True return True

Binary file not shown.