Skip to content
Snippets Groups Projects
Commit f72ffa2b authored by Michael Wimmer's avatar Michael Wimmer Committed by Christoph Groth
Browse files

make ldos raise NotImplementedError if only selfenergy is present (like wave_function)

parent 75e57d97
Branches
Tags
No related merge requests found
......@@ -460,8 +460,8 @@ class SparseSolver(object):
for lead in fsys.leads:
if not hasattr(lead, 'modes'):
# TODO: fix this
raise ValueError("ldos for leads with only self-energy "
"is not implemented yet")
raise NotImplementedError("ldos for leads with only "
"self-energy is not implemented yet")
linsys, lead_info = \
self._make_linear_sys(fsys, xrange(len(fsys.leads)), energy, args)
......
......@@ -393,7 +393,7 @@ def test_ldos(ldos):
np.array([1, 1]) / (2 * np.pi))
assert_raises(ValueError, ldos, fsys.precalculate(what='selfenergy'), 0)
fsys.leads[0] = LeadWithOnlySelfEnergy(fsys.leads[0])
assert_raises(ValueError, ldos, fsys, 0)
assert_raises(NotImplementedError, ldos, fsys, 0)
def test_wavefunc_ldos_consistency(wave_function, ldos):
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment