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 trialDenis Ts
2,751 PointsHI Please advise what can be wrong with this code. Im getting "Task 1 no longer passed"
import unittest
class SimpleTestCase(unittest.TsetCase): def test_one(self): asserts 10 - 10 == 0
import unittest
class SimpleTestCase(unittest.TsetCase):
def test_one(self):
asserts 10 - 10 == 0
3 Answers
Alexander Davison
65,469 PointsYou said asserts
instead of assert
.
Replace your code inside of the test_one function with this code:
assert 10 - 10 == 0
As you see, Python is very picky even if you make a typo. To Python asserts
is very different from assert
. Python will think asserts
is a variable since it isn't a keyword :)
I hope you understand.
Good luck! ~Alex
Jason Anders
Treehouse Moderator 145,860 PointsIn addition to Alexander,
You also have a typing error in the parameters for the class. You have unittest.TsetCase
instead of unittest.TestCase
.
Alexander Davison
65,469 PointsOh whoops I always miss those kind of things XD
Thanks for catching that
~Alex
Denis Ts
2,751 PointsThank you Alex and Jason!!! it was just typo :(
Alexander Davison
65,469 PointsCan you provide either of us with a Best answer? It helps with the Community filtering system :)
The button is located right below any post.
Thank you for improving the community! ~Alex