Skip to content

Commit

Permalink
flake8
Browse files Browse the repository at this point in the history
  • Loading branch information
Robert Moerland committed Jan 2, 2025
1 parent 8bed8e4 commit bb0522d
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
6 changes: 3 additions & 3 deletions tests/mathutils/test_integration.py
Original file line number Diff line number Diff line change
Expand Up @@ -5,13 +5,13 @@


@pytest.mark.parametrize("method", ("Gauss-Legendre", "Clenshaw-Curtis", "Lebedev-Laikov"))
def test_determine_integration_order_method(method):
def test_determine_integration_order_wrong_method(method):
with pytest.raises(ValueError, match=f"Wrong type of integration method specified: {method}"):
integration.determine_integration_order(method, 1)


@pytest.mark.parametrize("n_orders", (-10, -1.0, -0.0001))
def test_determine_integration_order_method(n_orders):
def test_determine_integration_order_wrong_order(n_orders):

with pytest.raises(
ValueError, match=f"Invalid value for n_orders. Must be > 0, got {n_orders}"
Expand All @@ -21,7 +21,7 @@ def test_determine_integration_order_method(n_orders):

@pytest.mark.parametrize("n_orders", np.arange(1, 50))
@pytest.mark.parametrize("method", ("lebedev-laikov", "gauss-legendre", "clenshaw-curtis"))
def test_determine_integration_order_method(method, n_orders):
def test_determine_integration_order(method, n_orders):

assert integration.determine_integration_order(method, n_orders) > n_orders

Expand Down
2 changes: 1 addition & 1 deletion tests/mathutils/test_lebedev_laikov.py
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
import numpy as np
import pytest

import lumicks.pyoptics.mathutils.lebedev_laikov as ll


@pytest.mark.parametrize("order", (-1, 0, 132.2))
def test_lebedev_laikov_args(order):
with pytest.raises(ValueError, match=f"A value of {order} is not supported"):
Expand Down

0 comments on commit bb0522d

Please sign in to comment.