Skip to content

Commit 6ab2c3b

Browse files
authored
fix(consume): fix genindex for EOF files (#1332)
1 parent 286c026 commit 6ab2c3b

File tree

1 file changed

+4
-2
lines changed

1 file changed

+4
-2
lines changed

src/cli/gen_index.py

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -155,18 +155,20 @@ def generate_fixtures_index(
155155

156156
relative_file_path = Path(file).absolute().relative_to(Path(input_path).absolute())
157157
for fixture_name, fixture in fixtures.items():
158+
fixture_fork = fixture.get_fork()
158159
test_cases.append(
159160
TestCaseIndexFile(
160161
id=fixture_name,
161162
json_path=relative_file_path,
162163
# eest uses hash; ethereum/tests uses generatedTestHash
163164
fixture_hash=fixture.info.get("hash")
164165
or f"0x{fixture.info.get('generatedTestHash')}",
165-
fork=fixture.get_fork(),
166+
fork=fixture_fork,
166167
format=fixture.__class__,
167168
)
168169
)
169-
forks.add(fixture.get_fork())
170+
if fixture_fork:
171+
forks.add(fixture_fork)
170172
fixture_formats.add(fixture.format_name)
171173

172174
display_filename = file.name

0 commit comments

Comments
 (0)