Heads up! To view this whole video, sign in with your Courses account or enroll in your free 7-day trial. Sign In Enroll
Start a free Courses trial
to watch this video
The `unittest` library has many different assertions but some are more commonly used than others. Let's look at how to check for membership, what class a variable is an instance of, and a couple of others.
New Terms
assertIn(x, y) - Make sure x
is a member of y
(this is like the in
keyword)
assertIsInstance(x, y) - Make sure x
is an instance of the y
class
assertGreaterEqual(x, y) - Make sure x
is greater than or equal to y
assertLessEqual(x, y) - Make sure x
is less than or equal to y
Related Discussions
Have questions about this video? Start a discussion with the community and Treehouse staff.
Sign upRelated Discussions
Have questions about this video? Start a discussion with the community and Treehouse staff.
Sign up
You need to sign up for Treehouse in order to download course files.
Sign upYou need to sign up for Treehouse in order to set up Workspace
Sign up