-
Notifications
You must be signed in to change notification settings - Fork 0
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
Sweep: Add unit tests for beyond_the_nest_models.py script #2
Comments
Actions (click)
❌ Unable to Complete PRI'm sorry, but it looks like an error has occurred. Try changing the issue description to re-trigger Sweep. If this error persists report it at https://discord.gg/sweep. For bonus GPT-4 tickets, please report this bug on Discord (tracking ID: Please look at the generated plan. If something looks wrong, please add more details to your issue.
🎉 Latest improvements to Sweep:
💡 To recreate the pull request edit the issue title or description. To tweak the pull request, leave a comment on the pull request. |
Details
Add unit tests for beyond_the_nest_models.py script
Modify test/test_beyond_the_nest.py with contents:
• Import the unittest and unittest.mock modules at the beginning of the file.
• Import the functions load_falcon_model_generation, load_falcon_model_classification, load_tokenizer, and generate_text from beyond_the_nest/beyond_the_nest_models.py.
• For each of the imported functions, create a test case class that inherits from unittest.TestCase.
• Inside each test case class, create a test method that calls the corresponding function with a unittest.mock.MagicMock object as an argument.
• In each test method, use the assert methods of unittest.TestCase to verify that the function behaves as expected when called with the MagicMock object. For example, you can assert that the function returns the expected result, or that it calls certain methods of the MagicMock object with the expected arguments.
• At the end of the file, add a conditional statement that checks if the file is being run as a script. If it is, call unittest.main() to run all test cases.
Checklist
test/test_beyond_the_nest.py
✗The text was updated successfully, but these errors were encountered: