This PR adds tests to the main.py file using a mocker. The tests cover the model initialization, the model forward pass, and the DataLoader functionality. Mock objects are used to isolate the components being tested and to make the tests faster and more reliable.
Summary of Changes
Created a new file named test_main.py in the src directory.
Imported the necessary modules for testing, including unittest, unittest.mock, and the modules used in main.py.
Imported the Net class and the DataLoader from main.py.
Created a new class for the tests that inherits from unittest.TestCase.
Implemented a setUp method that initializes a mock model and a mock DataLoader.
Created test methods for the model initialization, the model forward pass, and the DataLoader functionality.
Added additional test methods as needed.
Please review and merge this PR. Thank you!
Fixes #10.
🎉 Latest improvements to Sweep:
Sweep can now passively improve your repository! Check out Rules to learn more.
💡 To get Sweep to edit this pull request, you can:
Comment below, and Sweep can edit the entire PR
Comment on a file, Sweep will only modify the commented file
Edit the original issue to get Sweep to recreate the PR from scratch
Description
This PR adds tests to the main.py file using a mocker. The tests cover the model initialization, the model forward pass, and the DataLoader functionality. Mock objects are used to isolate the components being tested and to make the tests faster and more reliable.
Summary of Changes
Please review and merge this PR. Thank you!
Fixes #10.
🎉 Latest improvements to Sweep:
💡 To get Sweep to edit this pull request, you can: