CtrlK
CommunityDocumentationLog inGet started
Tessl Logo

tessl/pypi-vedro

Pragmatic Testing Framework for Python with BDD-style syntax and pluggable architecture

49%

Overall

Evaluation49%

1.09x

Agent success when using this tile

Overview
Eval results
Files

task.mdevals/scenario-2/

Delivery Quote Validation

Use the testing framework's scenario templating to validate a delivery quote helper across varied routes without duplicating scenario definitions. Delivery totals are computed as: base fee 5.00, plus 1.50 per kilometer, plus 1.00 per kilogram. Remote cities are currently unsupported and should be marked skipped rather than failed.

Capabilities

Parameterized totals

  • "metro" at 5 km and 2.0 kg returns total 14.50 when using a templated scenario instance labelled with the city and distance @test
  • "metro" at 18 km and 1.0 kg returns total 33.00 using the same template with a distinct parameter set @test
  • "remote" at 30 km and 3.0 kg is treated as unsupported and the matching scenario instance is explicitly skipped with a recorded reason instead of asserting a total @test

Keyword readability

  • A parameter set expressed with named arguments for city="suburb", distance_km=8.0, weight_kg=0.5 produces total 17.50 while keeping the subject text readable @test

Implementation

@generates

API

class DeliveryQuote:
    """
    Scenario template that verifies delivery price calculation for multiple routes.
    """
    subject: str

    def __init__(self, city: str, distance_km: float, weight_kg: float, expected_total: float | None = None, *, skip_reason: str | None = None) -> None: ...
    def given_route_inputs(self) -> None: ...
    def when_quote_is_requested(self) -> None: ...
    def then_total_matches(self) -> None: ...

Dependencies { .dependencies }

vedro { .dependency }

Behavior-driven testing framework providing scenario classes and parameterized templating support. @satisfied-by

tessl i tessl/pypi-vedro@1.14.0

tile.json