Help needed test_your_code.exercise_1(book) Module1

Someone can help me. For the programming I make the code and then I have the: test_your_code.exercise_1(book) and got this error message: NameError Traceback (most recent call last)
Cell In [1], line 2
1 # Test your code!
----> 2 test_your_code.exercise_1(book)

NameError: name ‘test_your_code’ is not defined
Thanks a lot

Hi @Khair,

Please make sure you are running all of the cells from top to bottom sequentially. This is especially important to do when you re-open the assignment (you have to run them every time). This will ensure that you are importing the test_your_code module.

Best,
Mubsi

So it means I have to import the test your code ?

How to do this: import test_your_code

Please I am stuck because of this

Ok solved

need help keep having this message error: KeyError Traceback (most recent call last)
Cell In [33], line 2
1 # Test your code!
----> 2 test_your_code.exercise_3()

File ~/work/test_your_code.py:241, in exercise_3()
237 cases.append(t)
239 return cases
→ 241 cases = g()
242 print_feedback(cases)

File ~/work/test_your_code.py:228, in exercise_3..g()
225 t.got = None
226 cases.append(t)
→ 228 std_out = out[0][“text”]
230 pattern = “Book is overdue - Contact Arthur Dent to return it”
231 t = test_case()

KeyError: ‘text’

Hi @Khair,

I’m going to direct message you regarding this.

thanks I just solved it

1 Like

Great! I’m going to close this thread now, as all your original queries of the thread seemed to be solved now.

Best of luck with the rest!