Commit 64daf399 authored by René Fritze's avatar René Fritze Committed by René Fritze

[test] move basic pod + svd_va check to hypothesis

parent 348dd196
......@@ -4,18 +4,20 @@
import numpy as np
import pytest
from hypothesis import given
from hypothesis.strategies import sampled_from
from pymor.algorithms.basic import almost_equal
from pymor.algorithms.pod import pod
from pymortests.fixtures.operator import operator_with_arrays_and_products
from pymortests.fixtures.vectorarray import vector_array, vector_array_without_reserve
from pymortests.strategies import vector_arrays
methods = ['method_of_snapshots', 'qr_svd']
@pytest.mark.parametrize('method', methods)
@given(vector_arrays(count=1), sampled_from(methods))
def test_pod(vector_array, method):
A = vector_array
A = vector_array[0]
print(type(A))
print(A.dim, len(A))
......
......@@ -4,16 +4,18 @@
import numpy as np
import pytest
from hypothesis import given
from hypothesis.strategies import sampled_from
from pymor.algorithms.basic import almost_equal
from pymor.algorithms.svd_va import method_of_snapshots, qr_svd
from pymortests.fixtures.operator import operator_with_arrays_and_products
from pymortests.fixtures.vectorarray import vector_array, vector_array_without_reserve
from pymortests.strategies import vector_arrays
methods = [method_of_snapshots, qr_svd]
@pytest.mark.parametrize('method', methods)
@given(vector_arrays(count=1), sampled_from(methods))
def test_method_of_snapshots(vector_array, method):
A = vector_array
print(type(A))
......
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