Skip to content

Commit

Permalink
unzip
Browse files Browse the repository at this point in the history
  • Loading branch information
Thiago-NovaesB committed Oct 30, 2024
1 parent e051288 commit 300fefd
Show file tree
Hide file tree
Showing 2 changed files with 15 additions and 0 deletions.
13 changes: 13 additions & 0 deletions test/helpers/zip_helper.jl
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
@testset "zip_helper.jl" begin
@testset "_unzip" begin
mktempdir() do tempdir
zip = ZipFile.Writer("temp.zip")
ZipFile.addfile(zip, "file1.txt")
ZipFile.addfile(zip, "file2.txt")
close(zip)
_ = ElectricityMarketData._unzip("temp.zip", x -> "test_" * x)
@test isfile("test_file1.txt")
@test isfile("test_file2.txt")
end
end
end
2 changes: 2 additions & 0 deletions test/runtests.jl
Original file line number Diff line number Diff line change
Expand Up @@ -3,12 +3,14 @@ using Dates
using TimeZones
using Test
using HTTP
using ZipFile
using DataFrames
using CSV

import ElectricityMarketData: get_timezone

# general
include("helpers/zip_helper.jl")
include("helpers/http_helper.jl")
include("electricity_market.jl")
#miso
Expand Down

0 comments on commit 300fefd

Please sign in to comment.