unittest.TestCase.assertLess()

assertLess(first, second, msg=None) assertLessEqual(first, second, msg=None)

Test that first is respectively >, >=, < or <= than second depending on the method name. If not, the test will fail:

>>> self.assertGreaterEqual(3, 4)
AssertionError: "3" unexpectedly not greater than or equal to "4"

New in version 3.1.

doc_python
2016-10-07 17:46:21
Comments
Leave a Comment

Please login to continue.