Skip to content
GitLab
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Sign in
Toggle navigation
Menu
Open sidebar
pyMOR
pymor
Commits
d0da6a3e
Commit
d0da6a3e
authored
Jan 24, 2023
by
René Fritze
Browse files
apply ruff fixes
parent
00654d69
Pipeline
#188857
passed with stages
in 46 minutes and 25 seconds
Changes
1
Pipelines
1
Hide whitespace changes
Inline
Side-by-side
src/pymortests/demos.py
View file @
d0da6a3e
...
...
@@ -217,14 +217,14 @@ def _test_demo(demo):
pass
try
:
from
matplotlib
import
pyplot
from
matplotlib
import
pyplot
as
plt
if
sys
.
version_info
[:
2
]
>
(
3
,
7
)
or
(
sys
.
version_info
[
0
]
==
3
and
sys
.
version_info
[
1
]
==
6
):
p
yplo
t
.
ion
()
p
l
t
.
ion
()
else
:
# the ion switch results in interpreter segfaults during multiple
# demo tests on 3.7 -> fall back on old monkeying solution
p
yplo
t
.
show
=
nop
p
l
t
.
show
=
nop
except
ImportError
:
pass
try
:
...
...
@@ -250,8 +250,8 @@ def _test_demo(demo):
from
pymor.parallel.default
import
_cleanup
_cleanup
()
try
:
from
matplotlib
import
pyplot
p
yplo
t
.
close
(
'all'
)
from
matplotlib
import
pyplot
as
plt
p
l
t
.
close
(
'all'
)
except
ImportError
:
pass
...
...
@@ -376,14 +376,14 @@ def test_parabolic_mor_results():
def
test_check_check_results_missing
(
tmp_path
):
test_name
=
tmp_path
.
name
args
=
[
'NONE'
,
tmp_path
]
results
=
{
"
error
"
:
math
.
pi
}
results
=
{
'
error
'
:
math
.
pi
}
with
pytest
.
raises
(
NoResultDataError
):
check_results
(
test_name
,
args
,
results
,
"
error
"
)
check_results
(
test_name
,
args
,
results
,
'
error
'
)
# running same check again against now recored data must be fine
check_results
(
test_name
,
args
,
results
,
"
error
"
)
check_results
(
test_name
,
args
,
results
,
'
error
'
)
with
pytest
.
raises
(
AssertionError
):
results
[
"
error
"
]
+=
1
check_results
(
test_name
,
args
,
results
,
"
error
"
)
results
[
'
error
'
]
+=
1
check_results
(
test_name
,
args
,
results
,
'
error
'
)
if
__name__
==
'__main__'
:
...
...
github-bridge
@project_976_bot
mentioned in commit
ffa1daae
·
Jan 24, 2023
mentioned in commit
ffa1daae
mentioned in commit ffa1daae0fb193ae10b33e03214c8e7aabb60e30
Toggle commit list
Write
Preview
Supports
Markdown
0%
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!
Cancel
Please
register
or
sign in
to comment