Skip to content

Commit

Permalink
Fix read_tree_exit_code_failure test failure
Browse files Browse the repository at this point in the history
  • Loading branch information
rohitpaulk committed Jan 25, 2024
1 parent 3707f0a commit 7519d40
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 13 deletions.
11 changes: 1 addition & 10 deletions internal/test_helpers/fixtures/read_tree_exit_code_failure
Original file line number Diff line number Diff line change
Expand Up @@ -27,18 +27,9 @@ Debug = true
[your_program] Initialized git directory
[stage-4] Writing a tree to git storage..
[stage-4] Running ./your_git.sh ls-tree --name-only 978c60262a761655b8429dbeb12f7dce351c6cd6
[your_program] Traceback (most recent call last):
[your_program]  File "/Users/rohitpaulk/.pyenv/versions/3.10.1/lib/python3.10/runpy.py", line 196, in _run_module_as_main
[your_program]  return _run_code(code, main_globals, None,
[your_program] humpty
[your_program] scooby
[your_program] vanilla
[your_program]  File "/Users/rohitpaulk/.pyenv/versions/3.10.1/lib/python3.10/runpy.py", line 86, in _run_code
[your_program]  exec(code, run_globals)
[your_program]  File "/Users/rohitpaulk/experiments/codecrafters/testers/git-tester/internal/test_helpers/stages/read_tree_exit_code_failure/app.py", line 111, in <module>
[your_program]  main()
[your_program]  File "/Users/rohitpaulk/experiments/codecrafters/testers/git-tester/internal/test_helpers/stages/read_tree_exit_code_failure/app.py", line 83, in main
[your_program]  raise RuntimeError(
[your_program] RuntimeError: Something went wrong!
[your_program] Something went wrong!
[stage-4] Expected 0 as exit code, got: 1
[stage-4] Test failed
Original file line number Diff line number Diff line change
Expand Up @@ -80,9 +80,8 @@ def main():
for obj in objs:
print(obj.filename)

raise RuntimeError(
"Something went wrong!"
) # Should exit with non-zero exit code for tests
print("Something went wrong!")
exit(1) # Simulate a non-zero exit code
else:
raise RuntimeError(f"Unknown command: #{command}")

Expand Down

0 comments on commit 7519d40

Please sign in to comment.