Beispiel #1
0
 def do_not_close_all(self, examples, *args, **kwargs):
     for a, b in examples:
         self.assertFalse(isclose(a, b, *args, **kwargs),
                          msg=("%s and %s should not be close" % (a, b)))
Beispiel #2
0
 def do_close(self, a, b, *args, **kwargs):
     self.assertTrue(isclose(a, b, *args, **kwargs),
                     msg="%s and %s should be close!" % (a, b))
Beispiel #3
0
 def do_not_close(self, a, b, *args, **kwargs):
     self.assertFalse(isclose(a, b, *args, **kwargs),
                      msg="%s and %s should not be close!" % (a, b))
Beispiel #4
0
 def test_negative_abstol(self):
     with self.assertRaises(ValueError):
         isclose(1, 1, 1e-100, -1e10)