Commit 5b2bc6a4 authored by Joseph Weston's avatar Joseph Weston
Browse files

add test for kpm.conductivity when 'norbs' not provided

parent 0c0a5c70
......@@ -80,6 +80,13 @@ def test_conductivity():
cond = kwant.kpm.conductivity(syst, alpha=alpha, beta=beta,
positions=None, **kpm_params)
# test when 'norbs' not provided
n = lat.norbs
lat.norbs = None
cond = kwant.kpm.conductivity(syst, alpha=alpha, beta=beta,
positions=None, **kpm_params)
lat.norbs = n
# test system or hamiltonian, no positions, but velocity operators
cond_xx = kwant.kpm.conductivity(syst, alpha='x', beta='x',
positions=None, **kpm_params)
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment