If a location string started with "-", OpenWeatherMapSource#query would return a TestWeather for unit testing purposes, and not query OpenWeatherMap. This caused a problem where locations with a negative latitude would fall into the TestWeather case, as the string would begin with "-". As a result, automatic location detection did not work in such locations (i.e. the Southern Hemisphere).
This PR changes the prefix to "_TEST-" (and also changes the other case to "_TEST+" for consistency), so that locations with a negative latitude don't fall into the unit testing case.
If a location string started with "-",
OpenWeatherMapSource#query
would return aTestWeather
for unit testing purposes, and not query OpenWeatherMap. This caused a problem where locations with a negative latitude would fall into theTestWeather
case, as the string would begin with "-". As a result, automatic location detection did not work in such locations (i.e. the Southern Hemisphere).This PR changes the prefix to "_TEST-" (and also changes the other case to "_TEST+" for consistency), so that locations with a negative latitude don't fall into the unit testing case.
Should fix #40.