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
4
4
open ZMidi.Internal .ParserMonad
5
5
open ZMidi.ReadFile
6
6
open 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
7
18
8
19
[<Tests>]
9
20
let tests =
10
21
testList " unit" [
11
22
12
23
test " parse all files" {
13
24
let dir = DirectoryInfo( Path.Combine(__ SOURCE_ DIRECTORY__, " .." , " .." , " data" ))
25
+ if not dir.Exists then
26
+ downloadFileSet dir
14
27
let files =
15
28
[|
16
29
yield ! dir.GetFiles( " *.midi" , SearchOption.AllDirectories)
You can’t perform that action at this time.
0 commit comments