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
9c313bbd
Commit
9c313bbd
authored
8 years ago
by
Anton Akhmerov
Browse files
Options
Downloads
Patches
Plain Diff
use skipif from pytest
parent
b94479a1
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/solvers/tests/test_mumps.py
+3
-15
3 additions, 15 deletions
kwant/solvers/tests/test_mumps.py
with
3 additions
and
15 deletions
kwant/solvers/tests/test_mumps.py
+
3
−
15
View file @
9c313bbd
...
...
@@ -6,7 +6,7 @@
# the file AUTHORS.rst at the top-level directory of this distribution and at
# http://kwant-project.org/authors.
from
numpy.testing.decorators
import
skipif
import
pytest
try
:
from
kwant.solvers.mumps
import
(
smatrix
,
greens_function
,
ldos
,
wave_function
,
options
,
reset_options
)
...
...
@@ -15,7 +15,8 @@ try:
except
ImportError
:
no_mumps
=
True
pytestmark
=
pytest
.
mark
.
skipif
(
no_mumps
,
reason
=
"
MUMPS not installed
"
)
opt_list
=
[{},
{
'
nrhs
'
:
1
},
{
'
nrhs
'
:
10
},
...
...
@@ -24,7 +25,6 @@ opt_list=[{},
{
'
nrhs
'
:
2
,
'
ordering
'
:
'
amd
'
,
'
sparse_rhs
'
:
True
}]
@skipif
(
no_mumps
)
def
test_output
():
for
opts
in
opt_list
:
reset_options
()
...
...
@@ -32,7 +32,6 @@ def test_output():
_test_sparse
.
test_output
(
smatrix
)
@skipif
(
no_mumps
)
def
test_one_lead
():
for
opts
in
opt_list
:
reset_options
()
...
...
@@ -40,7 +39,6 @@ def test_one_lead():
_test_sparse
.
test_one_lead
(
smatrix
)
@skipif
(
no_mumps
)
def
test_smatrix_shape
():
for
opts
in
opt_list
:
reset_options
()
...
...
@@ -48,14 +46,12 @@ def test_smatrix_shape():
_test_sparse
.
test_smatrix_shape
(
smatrix
)
@skipif
(
no_mumps
)
def
test_two_equal_leads
():
for
opts
in
opt_list
:
reset_options
()
options
(
**
opts
)
_test_sparse
.
test_two_equal_leads
(
smatrix
)
@skipif
(
no_mumps
)
def
test_graph_system
():
for
opts
in
opt_list
:
reset_options
()
...
...
@@ -63,7 +59,6 @@ def test_graph_system():
_test_sparse
.
test_graph_system
(
smatrix
)
@skipif
(
no_mumps
)
def
test_singular_graph_system
():
for
opts
in
opt_list
:
reset_options
()
...
...
@@ -71,7 +66,6 @@ def test_singular_graph_system():
_test_sparse
.
test_singular_graph_system
(
smatrix
)
@skipif
(
no_mumps
)
def
test_tricky_singular_hopping
():
for
opts
in
opt_list
:
reset_options
()
...
...
@@ -79,7 +73,6 @@ def test_tricky_singular_hopping():
_test_sparse
.
test_tricky_singular_hopping
(
smatrix
)
@skipif
(
no_mumps
)
def
test_many_leads
():
for
opts
in
opt_list
:
reset_options
()
...
...
@@ -87,7 +80,6 @@ def test_many_leads():
_test_sparse
.
test_many_leads
(
greens_function
,
smatrix
)
@skipif
(
no_mumps
)
def
test_selfenergy
():
for
opts
in
opt_list
:
reset_options
()
...
...
@@ -95,7 +87,6 @@ def test_selfenergy():
_test_sparse
.
test_selfenergy
(
greens_function
,
smatrix
)
@skipif
(
no_mumps
)
def
test_selfenergy_reflection
():
for
opts
in
opt_list
:
reset_options
()
...
...
@@ -103,7 +94,6 @@ def test_selfenergy_reflection():
_test_sparse
.
test_selfenergy_reflection
(
greens_function
,
smatrix
)
@skipif
(
no_mumps
)
def
test_very_singular_leads
():
for
opts
in
opt_list
:
reset_options
()
...
...
@@ -111,7 +101,6 @@ def test_very_singular_leads():
_test_sparse
.
test_very_singular_leads
(
smatrix
)
@skipif
(
no_mumps
)
def
test_ldos
():
for
opts
in
opt_list
:
reset_options
()
...
...
@@ -119,7 +108,6 @@ def test_ldos():
_test_sparse
.
test_ldos
(
ldos
)
@skipif
(
no_mumps
)
def
test_wavefunc_ldos_consistency
():
for
opts
in
opt_list
:
options
(
**
opts
)
...
...
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