-
Notifications
You must be signed in to change notification settings - Fork 26
Description
I was running the unit test for some exercises and encountered a couple of issues.
1. incorrect test.sh script for developers using Windows.
This is a small issue. Since I am running on Windows, the code in test.sh may need to be changed to source venv/Scripts/activate instead of current source venv/bin/activate. Personally find it sufficient to just add this as a note for future developers.
2. repo_smith might have some issues deleting temporary files on Windows
This seems to be a more serious issue. After changing the test.sh script, unit testings still fail with unexpected errors. Parts of the error message is provided below. The entire error message is really long and cannot be fully captured.
Not sure of the exact reason for this error, but it seems like repo_smith is trying to delete a temporary file that was not properly closed and Windows stopped it.
Currently I am able to resolve this problem by adding a conftest.py file under tests folder for each exercise, containing codes generated by Claude.ai to safely close the files before repo_smith deletes it. If this fails, it ignores the error. Unit testings behave as expected after this file is added, but the temporary folders are not deleted. Not sure if there is a cleaner way to walk around this?
The conftest.py file is provided below.
OS: Windows 11 + Bash