Unverified Commit 10646e83 authored by Stephan Rave's avatar Stephan Rave Committed by GitHub
Browse files

Merge pull request #1467 from pymor/fix_pickle_demo_tests

Fix demo tests to not create unwanted pickle output
parents b8937c65 537b14c8
Pipeline #106359 passed with stages
in 37 minutes and 49 seconds
......@@ -121,7 +121,7 @@ def main(
if pickle:
print(f"\nWriting reduced model to file {pickle}_reduced ...")
with open(pickle + '_reduced', 'wb') as f:
dump(rom, f)
dump((rom, problem.parameter_space), f)
print(f"Writing detailed model and reductor to file {pickle}_detailed ...")
with open(pickle + '_detailed', 'wb') as f:
dump((fom, reductor), f)
......
......@@ -71,7 +71,7 @@ THERMALBLOCK_ARGS = (
TB_IPYTHON_ARGS = THERMALBLOCK_ARGS[0:2]
THERMALBLOCK_ADAPTIVE_ARGS = (
('thermalblock_adaptive', ['--pickle', '--cache-region=memory', '--plot-solutions', '--plot-error-sequence', 10]),
('thermalblock_adaptive', ['--cache-region=memory', '--plot-solutions', '--plot-error-sequence', 10]),
('thermalblock_adaptive', ['--no-visualize-refinement', '--plot-err', 10]),
)
......@@ -246,7 +246,7 @@ def test_analyze_pickle1():
def test_analyze_pickle2():
d = mkdtemp()
try:
test_demos(('pymordemos.thermalblock', ['--pickle=' + os.path.join(d, 'data'), 2, 2, 2, 10]))
test_demos(('pymordemos.thermalblock_adaptive', ['--pickle=' + os.path.join(d, 'data'), 10]))
test_demos(('pymordemos.analyze_pickle',
['histogram', '--detailed-data=' + os.path.join(d, 'data_detailed'), os.path.join(d, 'data_reduced'),
10]))
......
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