Skip to content

Commit

Permalink
fix test cases, make it ready for TimeSeries v0.14.0 (#56)
Browse files Browse the repository at this point in the history
  • Loading branch information
iblislin authored Oct 29, 2018
1 parent b51ff77 commit feda6f7
Show file tree
Hide file tree
Showing 5 changed files with 14 additions and 29 deletions.
2 changes: 0 additions & 2 deletions test/all.jl

This file was deleted.

24 changes: 12 additions & 12 deletions test/const.jl
Original file line number Diff line number Diff line change
Expand Up @@ -5,27 +5,27 @@ using Test
@testset "TimeSeries readwrite parses csv file correctly" begin

@testset "1d values array works" begin
@test typeof(cl.values) == Array{Float64,1}
@test cl |> values isa Array{Float64,1}
end

@testset "2d values array works" begin
@test typeof(ohlc.values) == Array{Float64,2}
@test ohlc |> values isa Array{Float64,2}
end

@testset "timestamp parses to correct type" begin
@test typeof(cl.timestamp) == Vector{Date}
@test typeof(datetime1.timestamp) == Vector{DateTime}
@test cl |> timestamp isa Vector{Date}
@test datetime1 |> timestamp isa Vector{DateTime}
end

@testset "meta field is correctly constructed" begin
@test AAPL.meta == "AAPL"
@test BA.meta == "BA"
@test CAT.meta == "CAT"
@test DELL.meta == "DELL"
@test EBAY.meta == "EBAY"
@test F.meta == "F"
@test GE.meta == "GE"
@test mdata.meta == "Apple"
@test AAPL |> meta == "AAPL"
@test BA |> meta == "BA"
@test CAT |> meta == "CAT"
@test DELL |> meta == "DELL"
@test EBAY |> meta == "EBAY"
@test F |> meta == "F"
@test GE |> meta == "GE"
@test mdata |> meta == "Apple"
end
end

Expand Down
4 changes: 2 additions & 2 deletions test/downloads.jl
Original file line number Diff line number Diff line change
Expand Up @@ -4,13 +4,13 @@ using Test
@testset "remote" begin
@testset "FRED" begin
ta = fred()
@test length(ta.timestamp) > 100
@test ta |> timestamp |> length > 100
end

@testset "Yahoo" begin
# ta = yahoo()
# @test length(ta.timestamp) > 100
@test_broken 1==2
end

end
12 changes: 0 additions & 12 deletions test/helpers.jl

This file was deleted.

1 change: 0 additions & 1 deletion test/runtests.jl
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
using Test

include("const.jl")
include("helpers.jl")
include("downloads.jl")

0 comments on commit feda6f7

Please sign in to comment.