Skip to content

Commit

Permalink
[python3] py.test fixture params do not need to be lists
Browse files Browse the repository at this point in the history
  • Loading branch information
sdrave committed May 9, 2016
1 parent cc11736 commit abd30c1
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 6 deletions.
6 changes: 3 additions & 3 deletions src/pymortests/fixtures/vectorarray.py
Expand Up @@ -237,12 +237,12 @@ def picklable_vector_array_without_reserve(request):
return request.param()


@pytest.fixture(params=list(range(3)))
@pytest.fixture(params=range(3))
def vector_array(vector_array_without_reserve, request):
return vector_array_from_empty_reserve(vector_array_without_reserve, request.param)


@pytest.fixture(params=list(range(3)))
@pytest.fixture(params=range(3))
def picklable_vector_array(picklable_vector_array_without_reserve, request):
return vector_array_from_empty_reserve(picklable_vector_array_without_reserve, request.param)

Expand All @@ -256,7 +256,7 @@ def compatible_vector_array_pair_without_reserve(request):
return request.param()


@pytest.fixture(params=list(product(range(3), range(3))))
@pytest.fixture(params=product(range(3), range(3)))
def compatible_vector_array_pair(compatible_vector_array_pair_without_reserve, request):
v1, v2 = compatible_vector_array_pair_without_reserve
return vector_array_from_empty_reserve(v1, request.param[0]), vector_array_from_empty_reserve(v2, request.param[1])
Expand Down
6 changes: 3 additions & 3 deletions src/pymortests/solver.py
Expand Up @@ -28,17 +28,17 @@ def apply_adjoint(self, U, ind=None, mu=None):
return self.op.apply_adjoint(U, ind=ind, mu=mu)


@pytest.fixture(params=list(pymor.algorithms.genericsolvers.options().keys()))
@pytest.fixture(params=pymor.algorithms.genericsolvers.options().keys())
def generic_solver(request):
return {'inverse': request.param}


@pytest.fixture(params=list(dense_options().keys()))
@pytest.fixture(params=dense_options().keys())
def numpy_dense_solver(request):
return {'inverse': request.param}


@pytest.fixture(params=list(sparse_options().keys()))
@pytest.fixture(params=sparse_options().keys())
def numpy_sparse_solver(request):
return {'inverse': request.param}

Expand Down

0 comments on commit abd30c1

Please sign in to comment.