Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 4 additions & 0 deletions tests/test_models.py
Original file line number Diff line number Diff line change
Expand Up @@ -240,6 +240,10 @@ def test_fahrenheit_negative(self):
def test_fahrenheit_rounding(self):
assert convert_temp(22.0, TempUnit.FAHRENHEIT) == 71.6

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


class TestTempSuffix:
"""Tests for temp_suffix()."""
Expand Down