ensure SPEC_VERSION stays synchronized with actual spec tested

This commit is contained in:
Dustin Brody 2020-06-16 17:12:59 +02:00 committed by tersec
parent 49e9167b28
commit 044ced53be
1 changed files with 3 additions and 6 deletions

View File

@ -40,12 +40,9 @@ type
TestSizeError* = object of ValueError TestSizeError* = object of ValueError
const const
FixturesDir* = currentSourcePath.rsplit(DirSep, 1)[0] / ".." / ".." / "vendor" / "nim-eth2-scenarios" FixturesDir* =
SszTestsDir* = currentSourcePath.rsplit(DirSep, 1)[0] / ".." / ".." / "vendor" / "nim-eth2-scenarios"
when ETH2_SPEC == "v0.12.1": SszTestsDir* = FixturesDir / "tests-v" & SPEC_VERSION
FixturesDir/"tests-v0.12.1"
else:
FixturesDir/"tests-v0.11.3"
proc parseTest*(path: string, Format: typedesc[Json or SSZ], T: typedesc): T = proc parseTest*(path: string, Format: typedesc[Json or SSZ], T: typedesc): T =
try: try: