Skip to content

Commit

Permalink
Add Downloads to test dependencies
Browse files Browse the repository at this point in the history
Base.download() is deprecated
  • Loading branch information
abhro committed Jul 11, 2024
1 parent 7319162 commit c201e5c
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 4 deletions.
4 changes: 3 additions & 1 deletion Project.toml
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,7 @@ Aqua = "0.8"
CSVFiles = "1"
CodecZlib = "0.5, 0.6, 0.7"
ColorTypes = "0.11"
Downloads = "1.6"
FilePathsBase = "0.9"
HTTP = "0.6, 1"
Random = "<0.0.1, 0.7, 1"
Expand All @@ -26,10 +27,11 @@ Aqua = "4c88cf16-eb10-579e-8560-4a9242c79595"
CSVFiles = "5d742f6a-9f54-50ce-8119-2520741973ca"
CodecZlib = "944b1d66-785c-5afd-91f1-9de20f533193"
ColorTypes = "3da002f7-5984-5a60-b8a6-cbb66c0b333f"
Downloads = "f43a241f-c20a-4ad4-852c-f6b1247861c6"
FilePathsBase = "48062228-2e41-5def-b9a4-89aafe57970f"
HTTP = "cd3eb016-35fb-5094-929b-558a96fad6f3"
Random = "9a3f8284-a2c9-5f02-9a11-845980a1fd5c"
Test = "8dfed614-e22c-5e08-85e1-65c5234f0b40"

[targets]
test = ["Aqua", "ColorTypes", "CodecZlib", "CSVFiles", "FilePathsBase", "HTTP", "Random", "Test"]
test = ["Aqua", "ColorTypes", "CodecZlib", "CSVFiles", "Downloads", "FilePathsBase", "HTTP", "Random", "Test"]
7 changes: 4 additions & 3 deletions test/query.jl
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
using FileIO
using Test
using Random
import Downloads

@testset "OS" begin
if Sys.islinux()
Expand Down Expand Up @@ -399,19 +400,19 @@ let file_dir = joinpath(@__DIR__, "files"), file_path = Path(file_dir)
@test typeof(q) <: File{format"AVI"}
end
@testset "MP4 detection" begin
f = download("https://archive.org/download/LadybirdOpeningWingsCCBYNatureClip/Ladybird%20opening%20wings%20CC-BY%20NatureClip.mp4")
f = Downloads.download("https://archive.org/download/LadybirdOpeningWingsCCBYNatureClip/Ladybird%20opening%20wings%20CC-BY%20NatureClip.mp4")
q = query(f)
@test typeof(q) <: File{format"MP4"}
end
if Base.VERSION >= v"1.6" || !Sys.iswindows()
# FIXME: Windows fails to download the files on Julia 1.0
@testset "OGG detection" begin
f = download("https://upload.wikimedia.org/wikipedia/commons/8/87/Annie_Oakley_shooting_glass_balls%2C_1894.ogv")
f = Downloads.download("https://upload.wikimedia.org/wikipedia/commons/8/87/Annie_Oakley_shooting_glass_balls%2C_1894.ogv")
q = query(f)
@test typeof(q) <: File{format"OGG"}
end
@testset "MATROSKA detection" begin
f = download("https://upload.wikimedia.org/wikipedia/commons/1/13/Artist%E2%80%99s_impression_of_the_black_hole_inside_NGC_300_X-1_%28ESO_1004c%29.webm")
f = Downloads.download("https://upload.wikimedia.org/wikipedia/commons/1/13/Artist%E2%80%99s_impression_of_the_black_hole_inside_NGC_300_X-1_%28ESO_1004c%29.webm")
q = query(f)
@test typeof(q) <: File{format"MATROSKA"}
end
Expand Down

0 comments on commit c201e5c

Please sign in to comment.