Skip to content

Commit 5f8c105

Browse files
test: kill convert_temp rounding precision mutant (#58)
Co-authored-by: copilot-swe-agent[bot] <198982749+Copilot@users.noreply.github.com> Co-authored-by: deviantintegral <255023+deviantintegral@users.noreply.github.com>
1 parent cb6c464 commit 5f8c105

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

tests/test_models.py

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -240,6 +240,10 @@ def test_fahrenheit_negative(self):
240240
def test_fahrenheit_rounding(self):
241241
assert convert_temp(22.0, TempUnit.FAHRENHEIT) == 71.6
242242

243+
def test_fahrenheit_rounding_precision(self):
244+
"""22.3°C -> 72.14°F: round to 1 decimal gives 72.1, not 72.14."""
245+
assert convert_temp(22.3, TempUnit.FAHRENHEIT) == 72.1
246+
243247

244248
class TestTempSuffix:
245249
"""Tests for temp_suffix()."""

0 commit comments

Comments
 (0)