def test_failed_custom(self): tout = KeywordTimeout('1s', 'Custom message', VariableMock()) tout.starttime = time.time() - 2 assert_equals(tout.get_message(), 'Custom message')
def test_active(self): tout = KeywordTimeout('42s', variables=VariableMock()) tout.start() msg = tout.get_message() assert_true(msg.startswith('Keyword timeout 42 seconds active.'), msg) assert_true(msg.endswith('seconds left.'), msg)
def test_failed_custom(self): tout = KeywordTimeout('1s', 'Custom message', VariableMock()) tout.starttime = time.time() - 2 assert_equal(tout.get_message(), 'Custom message')
def test_failed_custom(self): tout = KeywordTimeout("1s", "Custom message", VariableMock()) tout.starttime = time.time() - 2 assert_equal(tout.get_message(), "Custom message")