Skip to content
GitLab
Explore
Sign in
Register
Primary navigation
Search or go to…
Project
K
kwant
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Model registry
Operate
Environments
Monitor
Incidents
Service Desk
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
Joseph Weston
kwant
Commits
b1ce67b6
Commit
b1ce67b6
authored
5 years ago
by
Christoph Groth
Browse files
Options
Downloads
Patches
Plain Diff
add failing test to be fixed in the next commit
parent
be41d0f8
No related branches found
Branches containing commit
No related tags found
Tags containing commit
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
kwant/tests/test_wraparound.py
+16
-0
16 additions, 0 deletions
kwant/tests/test_wraparound.py
with
16 additions
and
0 deletions
kwant/tests/test_wraparound.py
+
16
−
0
View file @
b1ce67b6
...
...
@@ -9,6 +9,7 @@
import
tempfile
import
itertools
import
numpy
as
np
from
numpy.testing
import
assert_equal
import
tinyarray
as
ta
import
pytest
...
...
@@ -380,3 +381,18 @@ def test_fd_mismatch():
for
k
in
np
.
linspace
(
-
np
.
pi
,
np
.
pi
,
5
)]
assert
np
.
allclose
(
spectrum1
,
spectrum2
)
# There seems no more specific way to only filter KwantDeprecationWarning.
@pytest.mark.filterwarnings
(
'
ignore
'
)
def
test_args_params_equivalence
():
for
lat
in
[
kwant
.
lattice
.
square
(),
kwant
.
lattice
.
honeycomb
(),
kwant
.
lattice
.
kagome
()]:
syst
=
kwant
.
Builder
(
kwant
.
TranslationalSymmetry
(
*
lat
.
prim_vecs
))
syst
[
lat
.
shape
((
lambda
pos
:
True
),
(
0
,
0
))]
=
1
syst
[
lat
.
neighbors
(
1
)]
=
0.1
syst
[
lat
.
neighbors
(
2
)]
=
lambda
a
,
b
,
param
:
0.01
syst
=
wraparound
(
syst
).
finalized
()
shs
=
syst
.
hamiltonian_submatrix
assert_equal
(
shs
(
args
=
[
"
bla
"
,
1
,
2
]),
shs
(
params
=
dict
(
param
=
"
bla
"
,
k_x
=
1
,
k_y
=
2
)))
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment