Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix agentskills tests #2242

Merged
merged 11 commits into from
Jun 4, 2024
Merged

Fix agentskills tests #2242

merged 11 commits into from
Jun 4, 2024

Conversation

tobitege
Copy link
Collaborator

@tobitege tobitege commented Jun 4, 2024

Test like "test_edit_file_not_opened" in "test_agent_skill.py" failed, as in it did not raise an exception editing a file, which should not be open in the first place.

Meaning: the CURRENT_FILE variable inside agenskills.py is never reset.

Added in testfile a pytest fixture to call a (newly added) method to reset the CURRENT_FILE variable after each test.
Importing the variable in the testfile and trying to reset it there did not work!

Run single test script like:
poetry run pytest ./tests/unit/test_agent_skill.py

grafik

@iFurySt
Copy link
Collaborator

iFurySt commented Jun 4, 2024

LGTM

@tobitege tobitege requested a review from iFurySt June 4, 2024 16:18
@tobitege
Copy link
Collaborator Author

tobitege commented Jun 4, 2024

Fixed my previous approach, thanks to @enyst ! 🤗

grafik

Ready for review.

Copy link
Collaborator

@enyst enyst left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks!

@enyst enyst enabled auto-merge (squash) June 4, 2024 21:21
@enyst enyst merged commit 44bbe5e into All-Hands-AI:main Jun 4, 2024
2 checks passed
@tobitege tobitege deleted the tests branch June 5, 2024 03:54
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants