-
Notifications
You must be signed in to change notification settings - Fork 9
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
Created unit tests for detumble.py #57
Conversation
- Created unit tests for functions dot_product(), x_product(), and magnetorquer_dipole() in detumble.py in Batt_Board (there is an identical detumble.py in FC_Board) with realistic argument inputs Bigger context: - do_detumble() (in functions.py in FC_Boards and battery_functions.py in Batt_Board) calls the magnetorquer_dipole() method (that calls the other methods dot_product and x_product) with tuple arguments of magnetic field strength at x,y,&z axis and angular velocities at x,y,&z axis. The method returns a list value for dipole_out (to be used to inform actuators on how much force must be applied for detumbling)
How to run: "cd Tests" > "cd unit_tests" > "python3 test_detumble.py"
Holy moly the first unit tests in the repo! I've done some work on adding automated testing to the repo in #26 and chose pytest because instead of the built-in unittest library because it seemed more widely used and was faster because it could run tests in parallel (here's a review comparing them). Could you switch these tests over to use pytest and then reuse some of the automation introduced in PR #26 to have it run automatically on commit? Pulling over those changes might be as simple as If you change the requirements file don't forget to rerun your pip install! |
…of function tests
… files in Tests/unit_tests (make test command)
This is looking good! Since there are two "separate" code bases in this repo If you like them, feel free to include them! |
Fixing up automation settings and fixing import issues
Bigger context: