Cloud-Code-AI/kaizen

bug: Rust test case generation throws an error but generates test files.

Closed this issue · 0 comments

I was trying to run the example here

but it generates rust files but abruptly throws error:

Traceback (most recent call last):
  File "/Users/sauravpanda/Github/cloudcode-OSS/kaizen-playground/examples.temp/rust_testgen.py", line 7, in <module>
    _, usage = generator.generate_tests(file_path=source, output_path=output)
  File "/Users/sauravpanda/Library/Caches/pypoetry/virtualenvs/kaizen-playground-keh5ekcW-py3.10/lib/python3.10/site-packages/kaizen/generator/unit_test.py", line 60, in generate_tests
    self.generate_test_files(parsed_data, file_extension, file_path)
  File "/Users/sauravpanda/Library/Caches/pypoetry/virtualenvs/kaizen-playground-keh5ekcW-py3.10/lib/python3.10/site-packages/kaizen/generator/unit_test.py", line 67, in generate_test_files
    test_file_name = f"test_{item['name'].lower()}.{file_extension}"
KeyError: 'name'