How to Use Grading Tests

So, you’ve submitted your first Homework assignment, and you desperately want to know how you did… well good news! Although grading takes a while on my end, you can get a sneak preview of how you did by downloading and running the grading tests! Read this for instructions on how to acquire and use them.

How to Get Grading Tests

Once the deadline for a Homework has passed (or more specifically, 24 hours after the deadline), I’ll post the grading tests for that homework on the instructions page - there will be a link at the top of the page.

Click the link, and it’ll take you to Box - you should only need to click “Download” in the top-right.

It’ll download a zip file, which you’ll need to unzip, and contained within you’ll see all of the grading tests. Sometimes it will just be the test files, other times I’ll add in some extra files that are used in testing.

How to Use Grading Tests

All you need to do with the test files are drag them into the /src folder in your repository, like so:

MAKE SURE that they go into the /src folder, the same folder that holds the test files you already have and the files you wrote your code in for the assignment.

Now, these grading test files also include the tests that you were given already, so you can feel free to delete the test files that were there previously (the ones that don’t say grading_tests).

I’ve highlighted the one’s to delete for Homework 1 below:

After you’ve done that, it should look something like this:

Running Grading Tests

Running your grading tests is the exact same as running your previous tests! Just open your terminal and make sure you cd to the /src directory of your repo, and just run pytest!

Hopefully your output looks something like this:

Mulligan Details

If you took a mulligan on an assignment, I STRONGLY encourage you to download these tests and run them as you complete that project. Since these are released after the deadline for a homework, you’ll have the opportunity to validate your code against the full grading suite before you make your final submission, and you will be docked double the points for failing any of these tests. The resource is there for you! Use it!