RunestoneComponents icon indicating copy to clipboard operation
RunestoneComponents copied to clipboard

AttributeError: module 'test' has no attribute 'testEqual'

Open irunestone opened this issue 6 years ago • 2 comments

Error reported in course thinkcspy on page UnitTesting by user moath.othman [email protected] I entered the following code from the Unit Testing section, URL below: https://runestone.academy/runestone/static/thinkcspy/Functions/UnitTesting.html

Code: def square(x): '''raise x to the second power''' return x * x

import test print('testing square function') test.testEqual(square(10), 100)

When I entered in my Python IDLE v3.6.5, I get the following error:

AttributeError: module 'test' has no attribute 'testEqual'

Please help update the code.

irunestone avatar Oct 18 '18 21:10 irunestone

This is still an issue.

czadikem avatar Apr 09 '22 04:04 czadikem

Please see: https://runestone.academy/ns/books/published/thinkcspy/Appendices/testmodule.html

bnmnetp avatar Apr 09 '22 19:04 bnmnetp