Solution Invalid - Test File Has Been Modified
When you start an AssignmentOS assignment, you may see a message stating that the existing unit test files must not be modified.
Sometimes, however, these files may be changed without you explicitly modifying them, e.g., your code editor adds extra tab space, etc.
If one of these test files change, and you commit this change, you will then see the following message when you go to submit your solution:
To resolve this issue, please follow the steps below:
1.
Checkout the version of the unit test file that has been changed (the file that is displayed in the error message).
You can do this by running the following command (assuming the hash of the Initial Commit
is d659c6ce6fee80c6cf4157c14609aeb307678a3c
, and the test file that has been changed is test/test_films_data_stats_generator.py
):
The hash above is the hash of the Initial Commit
commit of your repository. You can retrieve this for your repository by running the following command:
and then looking at the hash of the Initial Commit
commit:
2.
Now run
and you will see the change in the staging area:
To commit the change, run
3.
Finally, run
That's it; you're all set! You will now be able to submit your solution by clicking the Submit Solution
link again.
Last updated