Skip to content

Commit

Permalink
Explain the magic fixture.
Browse files Browse the repository at this point in the history
  • Loading branch information
tonyandrewmeyer committed Dec 18, 2024
1 parent 9f9b9f0 commit 82ca4e2
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions test/test_benchmark.py
Original file line number Diff line number Diff line change
Expand Up @@ -35,6 +35,8 @@
from bcharm import BenchmarkCharm


# Note: the 'benchmark' argument here is a fixture that pytest-benchmark
# automatically makes available to all tests.
def test_context_explicit_meta(benchmark):
ctx = benchmark(testing.Context, ops.CharmBase, meta={'name': 'foo'})
assert isinstance(ctx, testing.Context)
Expand Down

0 comments on commit 82ca4e2

Please sign in to comment.