Skip to content

Commit

Permalink
test: 修复天气命令测试错误问题
Browse files Browse the repository at this point in the history
  • Loading branch information
Cassius0924 committed Feb 3, 2024
1 parent bfe47a8 commit 72830ea
Showing 1 changed file with 1 addition and 3 deletions.
4 changes: 1 addition & 3 deletions tests/commands/test_weather/test_weather.py
Original file line number Diff line number Diff line change
Expand Up @@ -83,11 +83,9 @@ def test_generate_weather_message_success(self):
result = weather._generate_weather_message(
self.c_data, self.hourly_data, future_weather_list, sun_time
)
print(result)
true_result1 = "🏙️ 广州 📅 02月02日 星期五\n🌡️ 温度: 19°C ~ 26°C\n🌤️ 天气: 多云(🕓当前26.4°C)\n📈 逐时: 阴25° 阴24° 阴23° 阴21° 阴20° \n☀️ 明日日出: 07:06 今日日落: 18:14\n💨 1级 😷较差 💧60% 🌞最弱\n"
true_result2 = "🏙️ 广州 📅 02月02日 星期五\n🌡️ 温度: 19°C ~ 26°C\n🌤️ 天气: 多云(🕓当前26.4°C)\n📈 逐时: 阴25° 阴24° 阴23° 阴21° 阴20° \n☀️ 明日日出: 07:06 明日日落: 18:15\n💨 1级 😷较差 💧60% 🌞最弱\n"
self.assertEqual(result, true_result1)
self.assertEqual(result, true_result2)
self.assertTrue(result == true_result1 or result == true_result2)

def test_get_future_weather_success(self):
result = weather._get_future_weather(
Expand Down

0 comments on commit 72830ea

Please sign in to comment.