Fix CI
This commit is contained in:
+3
-3
@@ -3,12 +3,12 @@ from weather_utils import get_weather_comment
|
|||||||
|
|
||||||
def test_weather_comment_hot():
|
def test_weather_comment_hot():
|
||||||
# Проверяем, что при +30 будет "Жара! ☀️"
|
# Проверяем, что при +30 будет "Жара! ☀️"
|
||||||
assert get_weather_comment(30) == "Жара!"
|
assert get_weather_comment(30) == "Жара! ☀️"
|
||||||
|
|
||||||
def test_weather_comment_cold():
|
def test_weather_comment_cold():
|
||||||
# Проверяем, что при -10 будет "Дубак! ❄️"
|
# Проверяем, что при -10 будет "Дубак! ❄️"
|
||||||
assert get_weather_comment(-10) == "Дубак"
|
assert get_weather_comment(-10) == "Дубак! ❄️"
|
||||||
|
|
||||||
def test_weather_comment_normal():
|
def test_weather_comment_normal():
|
||||||
# Проверяем промежуточное значение
|
# Проверяем промежуточное значение
|
||||||
assert get_weather_comment(15) == "Норма"
|
assert get_weather_comment(15) == "Нормальная погода ☁️"
|
||||||
|
|||||||
+6
-6
@@ -1,10 +1,10 @@
|
|||||||
|
# weather_utils.py
|
||||||
|
|
||||||
def get_weather_comment(temperature):
|
def get_weather_comment(temperature):
|
||||||
|
"""Возвращает текстовый комментарий и эмодзи в зависимости от температуры"""
|
||||||
if temperature >= 25:
|
if temperature >= 25:
|
||||||
return "Жара!"
|
return "Жара! ☀️"
|
||||||
|
|
||||||
elif temperature <= 0:
|
elif temperature <= 0:
|
||||||
return "Дубак"
|
return "Дубак! ❄️"
|
||||||
|
|
||||||
else:
|
else:
|
||||||
return "Норма"
|
return "Нормальная погода ☁️"
|
||||||
|
|||||||
Reference in New Issue
Block a user