mirror of
https://github.com/triqs/dft_tools
synced 2024-12-21 11:53:41 +01:00
BlockStructure: update test
This commit is contained in:
parent
7e82b3eee5
commit
3dbc360173
@ -376,10 +376,10 @@ class BlockStructure(object):
|
||||
if not compare(x,y):
|
||||
return False
|
||||
return True
|
||||
elif isinstance(one,int):
|
||||
return one==two
|
||||
elif isinstance(one,str):
|
||||
elif isinstance(one,(int,bool, str, np.bool_)):
|
||||
return one==two
|
||||
elif isinstance(one,np.ndarray):
|
||||
return np.all(one==two)
|
||||
elif isinstance(one,dict):
|
||||
if set(one.keys()) != set(two.keys()):
|
||||
return False
|
||||
@ -391,7 +391,8 @@ class BlockStructure(object):
|
||||
return False
|
||||
|
||||
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)):
|
||||
return False
|
||||
return True
|
||||
|
Binary file not shown.
Loading…
Reference in New Issue
Block a user