Welcome to the Treehouse Community

Want to collaborate on code errors? Have bugs you need feedback on? Looking for an extra set of eyes on your latest project? Get support with fellow developers, designers, and programmers of all backgrounds and skill levels here with the Treehouse Community! While you're at it, check out some resources Treehouse students have shared here.

Looking to learn something new?

Treehouse offers a seven day free trial for new students. Get access to thousands of hours of content and join thousands of Treehouse students and alumni in the community today.

Start your free trial

Python Python Testing First Steps With Testing Writing and Running Doctests

Just in case your test had unexpected failures! Read this... [SOLUTION]

This is a note for students who might have the same experience as me:

If your get_moves() test had unexpected failures, where Got: seems to be exactly the same as Expected:, make sure you have properly cleaned up all the whitespace around the doctest after copying and pasting from the shell. Even a single extra spacebar space will cause the test to fail.

Cheers! Graham

rydavim
rydavim
18,813 Points

I've added a solution tag to your post. White space is certainly very important in Python. Happy coding!

Thanks, rydavim!

Awesome, Alexander Kallaway (Emelianov)! Glad it helped.

V K
V K
5,237 Points

Thanks so much for this!

1 Answer