def test_rounded_failure_no_message(self): try: Assert.rounded(14.983, 14.985) except AssertionError as e: Assert.equal(e.msg, "neither 14.983 nor 14.985 is a round of the other. ")
def test_rounded_down(self): Assert.rounded(14.53, 14.534) Assert.rounded(11, 11.3)
def test_rounded_failure_with_message(self): try: Assert.rounded(13, 19, msg="failure message") except AssertionError as e: Assert.equal(e.msg, "neither 13 nor 19 is a round of the other. failure message")
def test_rounded_up(self): Assert.rounded(11, 10.8) Assert.rounded(14.53, 14.529)