def test_deprecated_msg_param(self): with warnings.catch_warnings(record=True) as w: assertions.assert_is_not(False, None, msg="This is a message") assertions.assert_equal(len(w), 1) assert issubclass(w[-1].category, DeprecationWarning) assertions.assert_in("msg is deprecated", str(w[-1].message))
def test_message_param_not_deprecated(self): with warnings.catch_warnings(record=True) as w: assertions.assert_is_not(False, None, message="This is a message") assertions.assert_equal(len(w), 0)