This repository has been archived by the owner on Jan 3, 2021. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 3
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
3fe56f2
commit b021562
Showing
1 changed file
with
13 additions
and
8 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,11 +1,16 @@ | ||
using DarkSky | ||
using Base.Test | ||
|
||
response = forecast(42.3601, -71.0589); | ||
@test typeof(response) === DarkSky.DarkSkyResponse | ||
response = forecast(42.3601, -71.0589, exclude=["currently"], extend="hourly"); | ||
@test typeof(response) === DarkSky.DarkSkyResponse | ||
response = forecast(42.3601, -71.0589, DateTime(2018, 1, 1, 0, 0, 0)); | ||
@test typeof(response) === DarkSky.DarkSkyResponse | ||
response = forecast(42.3601, -71.0589, DateTime(2018, 1, 1, 0, 0, 0), lang="es", units="si", exclude=["minutely"]); | ||
@test typeof(response) === DarkSky.DarkSkyResponse | ||
if haskey(ENV, "DARKSKY_API_KEY") | ||
info("Dark Sky API key was found in your system environment variables, running tests...") | ||
response = forecast(42.3601, -71.0589); | ||
@test typeof(response) === DarkSky.DarkSkyResponse | ||
response = forecast(42.3601, -71.0589, exclude=["currently"], extend="hourly"); | ||
@test typeof(response) === DarkSky.DarkSkyResponse | ||
response = forecast(42.3601, -71.0589, DateTime(2018, 1, 1, 0, 0, 0)); | ||
@test typeof(response) === DarkSky.DarkSkyResponse | ||
response = forecast(42.3601, -71.0589, DateTime(2018, 1, 1, 0, 0, 0), lang="es", units="si", exclude=["minutely"]); | ||
@test typeof(response) === DarkSky.DarkSkyResponse | ||
else | ||
warn("Dark Sky API key was not found in your system environment variables, skipping tests...") | ||
end |