Skip to content

Commit

Permalink
Fix Pyspec tests
Browse files Browse the repository at this point in the history
  • Loading branch information
rubo committed Jan 12, 2024
1 parent ba8b3d6 commit df82d37
Showing 1 changed file with 7 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@
using System.Collections.Generic;
using System.Formats.Tar;
using System.IO;
using System.IO.Compression;
using System.Linq;
using System.Net.Http;
using Ethereum.Test.Base;
Expand Down Expand Up @@ -34,7 +35,12 @@ private void DownloadAndExtract(string archiveVersion, string archiveName, strin
HttpResponseMessage response = httpClient.GetAsync(string.Format(Constants.ARCHIVE_URL_TEMPLATE, archiveVersion, archiveName)).GetAwaiter().GetResult();
response.EnsureSuccessStatusCode();
using Stream contentStream = response.Content.ReadAsStreamAsync().GetAwaiter().GetResult();
TarFile.ExtractToDirectory(contentStream, testsDirectoryName, true);
using GZipStream gzStream = new(contentStream, CompressionMode.Decompress);

if (!Directory.Exists(testsDirectoryName))
Directory.CreateDirectory(testsDirectoryName);

TarFile.ExtractToDirectory(gzStream, testsDirectoryName, true);
}

private IEnumerable<BlockchainTest> LoadTestsFromDirectory(string testDir, string wildcard)
Expand Down

0 comments on commit df82d37

Please sign in to comment.