Student User Guide
  • 👋Welcome to AssignmentOS!
  • 💻Workflow
    • 1️⃣Prerequisites
    • 2️⃣Begin Assignment
    • 3️⃣Cloning Repo
    • 4️⃣Pushing Changes
    • 5️⃣Submitting Solution
  • 🔎Tracking
    • Tracking Your Assignments
  • 👁️Reviewing Results
    • View Score & Status
    • View Report
    • View Submission Feedback & Recommendations
  • ❓FAQ
    • GitHub/GitLab 404 Error
    • Forgot To Submit Solution Before Deadline
    • Solution Invalid - Test File Has Been Modified
Powered by GitBook
On this page

Was this helpful?

  1. FAQ

Solution Invalid - Test File Has Been Modified

PreviousForgot To Submit Solution Before Deadline

Last updated 1 year ago

Was this helpful?

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:

Invalid Solution Error:

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):

git checkout d659c6ce6fee80c6cf4157c14609aeb307678a3c -- 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:

git log

and then looking at the hash of the Initial Commit commit:

2.

Now run

git status

and you will see the change in the staging area:

To commit the change, run

git commit -m "Reverting test file change"

3.

Finally, run

git push

That's it; you're all set! You will now be able to submit your solution by clicking the Submit Solution link again.

❓
Invalid Solution Error:
Git Log
Git Status