Vladmodels Katya Y117 47 154 | macOS |
@property def area_mm2(self) -> int: """Surface area in square millimetres (width × height).""" return self.width_mm * self.height_mm
@dataclass(frozen=True, slots=True) class VladModel: """A tiny data‑class representing a single VladModels product.""" brand: str # e.g. "vladmodels" name: str # e.g. "katya" code: str # e.g. "y117" width_mm: int # first numeric value (mm) height_mm: int # second numeric value (mm) vladmodels katya y117 47 154
if brand != "vladmodels": raise ValueError(f"Brand must be 'vladmodels', got 'brand'") @property def area_mm2(self) -> int: """Surface area in
def test_non_numeric(): with pytest.raises(ValueError, match="must be integer numbers"): parse_vladmodels_spec("vladmodels katya y117 forty seven 154") Run with: @property def area_mm2(self) ->