File tree Expand file tree Collapse file tree 1 file changed +13
-0
lines changed
tests/zmidi-fs-core.Tests Expand file tree Collapse file tree 1 file changed +13
-0
lines changed Original file line number Diff line number Diff line change @@ -4,13 +4,26 @@ open Expecto
44open ZMidi.Internal .ParserMonad
55open ZMidi.ReadFile
66open ZMidi.DataTypes
7+ open System.Net
8+ open System.IO .Compression
9+
10+ let downloadFileSet ( directory : DirectoryInfo ) =
11+ directory.Create()
12+ let archive = Path.Combine( directory.FullName, " maestro-v2.0.0-midi.zip" )
13+ let client = new WebClient()
14+
15+ client.DownloadFile( @" https://storage.googleapis.com/magentadata/datasets/maestro/v2.0.0/maestro-v2.0.0-midi.zip" , archive)
16+ ZipFile.ExtractToDirectory( archive, Path.Combine( directory.FullName, " maestro-v2.0.0-midi" ))
17+ File.Delete archive
718
819[<Tests>]
920let tests =
1021 testList " unit" [
1122
1223 test " parse all files" {
1324 let dir = DirectoryInfo( Path.Combine(__ SOURCE_ DIRECTORY__, " .." , " .." , " data" ))
25+ if not dir.Exists then
26+ downloadFileSet dir
1427 let files =
1528 [|
1629 yield ! dir.GetFiles( " *.midi" , SearchOption.AllDirectories)
You can’t perform that action at this time.
0 commit comments