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):
|
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.
Loading…
Reference in New Issue
Block a user