Skip to content

Commit

Permalink
feat: add unit test class for Util_Functions.py
Browse files Browse the repository at this point in the history
  • Loading branch information
yanliutafewa committed Jun 7, 2024
1 parent 34aaa77 commit ecddf87
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion projects/API Based Weather Report/Util_Functions.py
Original file line number Diff line number Diff line change
Expand Up @@ -60,7 +60,7 @@ def convert_temperature(str_temperature_kelvin, temperature_unit):
"""
# Convert strings to integers
try:
temperature_k = int(str_temperature_kelvin)
temperature_k = float(str_temperature_kelvin)
except ValueError:
return "API temperature data format error!"

Expand Down

0 comments on commit ecddf87

Please sign in to comment.