Exemplo n.º 1
0
 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. ")
Exemplo n.º 2
0
 def test_rounded_down(self):
     Assert.rounded(14.53, 14.534)
     Assert.rounded(11, 11.3)
Exemplo n.º 3
0
 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")
Exemplo n.º 4
0
 def test_rounded_up(self):
     Assert.rounded(11, 10.8)
     Assert.rounded(14.53, 14.529)