Skip to content

Commit

Permalink
Fix missing parameter in benchmark
Browse files Browse the repository at this point in the history
  • Loading branch information
hgrecco committed Jul 15, 2023
1 parent bda13d2 commit 2d649ea
Showing 1 changed file with 8 additions and 3 deletions.
11 changes: 8 additions & 3 deletions pint/testsuite/benchmarks/test_10_registry.py
Original file line number Diff line number Diff line change
Expand Up @@ -85,6 +85,7 @@ def test_parse_units(benchmark, setup: SetupType, key: str, pre_run: bool):


@pytest.mark.parametrize("key", UNITS)
@pytest.mark.parametrize("pre_run", (True, False))
def test_parse_expression(benchmark, setup: SetupType, key: str, pre_run: bool):
ureg, _ = setup
if pre_run:
Expand All @@ -94,7 +95,7 @@ def test_parse_expression(benchmark, setup: SetupType, key: str, pre_run: bool):

@pytest.mark.parametrize("unit", OTHER_UNITS)
@pytest.mark.parametrize("pre_run", (True, False))
def test_base_units(benchmark, setup: SetupType, unit, pre_run):
def test_base_units(benchmark, setup: SetupType, unit: str, pre_run: bool):
ureg, _ = setup
if pre_run:
no_benchmark(ureg.get_base_units, unit)
Expand All @@ -103,7 +104,9 @@ def test_base_units(benchmark, setup: SetupType, unit, pre_run):

@pytest.mark.parametrize("unit", OTHER_UNITS)
@pytest.mark.parametrize("pre_run", (True, False))
def test_to_units_container_registry(benchmark, setup: SetupType, unit, pre_run):
def test_to_units_container_registry(
benchmark, setup: SetupType, unit: str, pre_run: bool
):
ureg, _ = setup
if pre_run:
no_benchmark(pint.util.to_units_container, unit, ureg)
Expand All @@ -112,7 +115,9 @@ def test_to_units_container_registry(benchmark, setup: SetupType, unit, pre_run)

@pytest.mark.parametrize("unit", OTHER_UNITS)
@pytest.mark.parametrize("pre_run", (True, False))
def test_to_units_container_detached(benchmark, setup: SetupType, unit, pre_run):
def test_to_units_container_detached(
benchmark, setup: SetupType, unit: str, pre_run: bool
):
ureg, _ = setup
if pre_run:
no_benchmark(pint.util.to_units_container, unit, ureg)
Expand Down

0 comments on commit 2d649ea

Please sign in to comment.