Test check is not running

Hello I have written my codes but when I click /run Test your code! - its not giving any results . below is the msg I keep getting for all qus :


NameError Traceback (most recent call last)
Cell In [1], line 2
1 # Test your code!
----> 2 test_your_code.exercise_1a(book_title, author, year_published, available_copies)

NameError: name ‘test_your_code’ is not defined

Every time you open a notebook, you must run all of the cells starting from the top. That’s how the assets are imported and the workspace is configured.

Hi - Thanks for your response. The issue is that it “check your test” is not running i.e. not giving any results except the error msg :frowning:

You mean the “test_your_code()” function?

I’m getting the same error. When I checked my code, I get an error message. Is it me or something else? Thanks in advance

NameError: name 'test_your_code' is not defined

I tried again, and it’s working now. Not sure what happened! TIA!

Sometimes restarting the Kernel is also helpful.

Yes same error for me when I shift enter “test_your_code” - it is giving me below error

NameError: name ‘test_your_code’ is not defined

I restarted Kernel , cleared out outcome but still not working ..

That probably means you haven’t run all of the prior cells in the notebook.

We might need to wait for a mentor for that course to stop by with more suggestions. I have not seen the materials for that course.

Hi all,

As Tom has already mentioned, you have to run all of the cells every time you open the assignment. Particularly, the very first cell of the notebook which is:

import test_your_code

Best,
Mubsi